You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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().
Activity
jdemeyer commentedon Jun 19, 2019
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().
methane commentedon Jun 28, 2019
New changeset b1263d5 by Inada Naoki (Jeroen Demeyer) in branch 'master':
bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)
b1263d5
methane commentedon Jul 8, 2019
New changeset 762f93f by Inada Naoki (Jeroen Demeyer) in branch 'master':
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
762f93f
encukou commentedon Jul 8, 2019
Thank you, Jeroen and INADA-san!
ZackerySpytz commentedon Jul 17, 2019
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]
1050 | {"get", (PyCFunction)mappingproxy_get, METH_FASTCALL,
| ^
PR 14814 fixes this.
methane commentedon Aug 14, 2019
New changeset 43d564c by Inada Naoki (Zackery Spytz) in branch 'master':
bpo-37337: Fix a GCC 9 warning in Objects/descrobject.c (GH-14814)
43d564c