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
Add _PyObject_VectorcallMethod() function #81518
Comments
To augment the various PyObject_CallMethod...() functions, we add _PyObject_VectorcallMethod() which uses the vectorcall calling convention. To be consistent with the other vectorcall functions, this function is provisional for now. For efficiency, the "self" argument is NOT passed as separate argument but as part of the usual args array. In other words, the call looks like an unbound method call. I am also adding _PyObject_VectorcallMethodId() taking a _Py_Identifier* as argument and convenience functions PyObject_CallMethodNoArgs() and _PyObject_CallMethodIdNoArgs(), analogous to the recently added PyObject_CallNoArgs(). |
Thank you, Jeroen and INADA-san! |
Commit b1263d5 causes GCC 9.1.0 to give a warning in Objects/descrobject.c. Objects/descrobject.c:1050:19: warning: cast between incompatible function types from ‘PyObject * ()(mappingproxyobject *, PyObject * const, Py_ssize_t)’ {aka ‘struct _object * ()(struct <anonymous> *, struct _object * const, long int)’} to ‘PyObject * ()(PyObject *, PyObject *)’ {aka ‘struct _object * ()(struct _object *, struct _object *)’} [-Wcast-function-type] PR 14814 fixes this. |
New changeset 43d564c by Inada Naoki (Zackery Spytz) in branch 'master': |
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: