This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年03月31日 22:06 by fijal, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
Messages (7) | |||
---|---|---|---|
msg102038 - (view) | Author: Maciek Fijalkowski (fijal) | Date: 2010年03月31日 22:06 | |
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) |
|||
msg102039 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年03月31日 22:09 | |
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. |
|||
msg102040 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年03月31日 22:10 | |
The #define dates back from 2007, this changeset: branch: trunk user: guido date: Sat Aug 30 17:02:50 1997 +0200 files: Include/ceval.h Python/ceval.c description: [svn r8683] Inline PyObject_CallObject (Marc-Andre Lemburg). |
|||
msg102041 - (view) | Author: Marc-Andre Lemburg (lemburg) * (Python committer) | Date: 2010年03月31日 22:20 | |
Antoine Pitrou wrote: > > Antoine Pitrou <pitrou@free.fr> added the comment: > > The #define dates back from 2007, this changeset: > > branch: trunk > user: guido > date: Sat Aug 30 17:02:50 1997 +0200 > files: Include/ceval.h Python/ceval.c > description: > [svn r8683] Inline PyObject_CallObject (Marc-Andre Lemburg). That's not useless: it's a typical backwards compatibility macro to auto-upgrade existing software via recompile. 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 now, though. |
|||
msg102050 - (view) | Author: Maciek Fijalkowski (fijal) | Date: 2010年04月01日 01:33 | |
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. |
|||
msg102100 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年04月01日 15:09 | |
Right, we can certainly suppress the function definition now and just keep the macro. (especially given it's 1997, not 2007, there was a typo in my message) |
|||
msg102105 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年04月01日 16:53 | |
Fixed in r79555 (trunk), r79556 (py3k). |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022年04月11日 14:56:59 | admin | set | github: 52523 |
2010年04月01日 16:53:54 | pitrou | set | status: open -> closed resolution: fixed stage: needs patch -> resolved |
2010年04月01日 16:53:44 | pitrou | set | messages: + msg102105 |
2010年04月01日 15:09:57 | pitrou | set | priority: normal versions: + Python 3.2 messages: + msg102100 assignee: pitrou type: enhancement stage: needs patch |
2010年04月01日 01:33:39 | fijal | set | messages: + msg102050 |
2010年03月31日 22:20:48 | lemburg | set | messages: + msg102041 |
2010年03月31日 22:10:39 | pitrou | set | nosy:
+ lemburg messages: + msg102040 |
2010年03月31日 22:09:18 | pitrou | set | nosy:
+ pitrou messages: + msg102039 |
2010年03月31日 22:06:51 | fijal | create |