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.

Title: Add _PyObject_VectorcallMethod() function
Type: Stage: resolved
Components: Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Mark.Shannon, ZackerySpytz, jdemeyer, methane, petr.viktorin
Priority: normal Keywords: patch

Created on 2019-06-19 09:35 by jdemeyer, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14228 merged jdemeyer, 2019-06-19 10:15
PR 14267 merged jdemeyer, 2019-06-20 14:06
PR 14814 merged ZackerySpytz, 2019-07-17 15:02
Messages (6)
msg346032 - (view) Author: Jeroen Demeyer (jdemeyer) * (Python triager) Date: 2019-06-19 09:35
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().
msg346816 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-06-28 09:49
New changeset b1263d5a60d3f7ab02dd28409fff59b3815a3f67 by Inada Naoki (Jeroen Demeyer) in branch 'master':
bpo-37337: Add _PyObject_VectorcallMethod() (GH-14228)
msg347487 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-07-08 08:19
New changeset 762f93ff2efd6b7ef0177cad57939c0ab2002eac by Inada Naoki (Jeroen Demeyer) in branch 'master':
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
msg347490 - (view) Author: Petr Viktorin (petr.viktorin) * (Python committer) Date: 2019-07-08 08:29
Thank you, Jeroen and INADA-san!
msg348065 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-07-17 15:04
Commit b1263d5a60d3f7ab02dd28409fff59b3815a3f67 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.
msg349648 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-08-14 05:51
New changeset 43d564c18c97421f73025ac3132a194975c76bd6 by Inada Naoki (Zackery Spytz) in branch 'master':
bpo-37337: Fix a GCC 9 warning in Objects/descrobject.c (GH-14814)
Date User Action Args
2022-04-11 14:59:16adminsetgithub: 81518
2019-08-14 05:51:09methanesetmessages: + msg349648
2019-07-17 15:04:30ZackerySpytzsetnosy: + ZackerySpytz
messages: + msg348065
2019-07-17 15:02:40ZackerySpytzsetpull_requests: + pull_request14608
2019-07-08 08:29:02petr.viktorinsetstatus: open -> closed
resolution: fixed
messages: + msg347490

stage: patch review -> resolved
2019-07-08 08:19:32methanesetmessages: + msg347487
2019-06-28 14:46:03vstinnersetnosy: - vstinner
2019-06-28 09:49:05methanesetmessages: + msg346816
2019-06-20 14:06:21jdemeyersetpull_requests: + pull_request14093
2019-06-19 10:15:37jdemeyersetkeywords: + patch
stage: patch review
pull_requests: + pull_request14064
2019-06-19 09:35:31jdemeyercreate