-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useless PyEval_CallObject function #52523
Comments
In ceval.c there is such code: PyObject *
PyEval_CallObject(PyObject *func, PyObject *arg)
{
return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL);
}
#define PyEval_CallObject(func,arg) \
PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) Is this needed any longer? (both #define and function have the same name) |
Well, #defines are not exported in shared libraries. I suppose PyEval_CallObject() was part of an old definition of the Python C-API and it was kept for compatibility. |
The #define dates back from 2007, this changeset: branch: trunk |
Antoine Pitrou wrote:
That's not useless: it's a typical backwards compatibility macro It's also still used a lot in the Python source code and elsewhere: http://www.google.de/search?q=PyEval_CallObject The function PyEval_CallObject() can probably be removed by |
Yeah, I meant the function. Sorry for not being specific enough. I suppose the function is there to preserve ABI, but definitely code needed recompilation since 2007. |
Right, we can certainly suppress the function definition now and just keep the macro. |
Fixed in r79555 (trunk), r79556 (py3k). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: