diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
commit | 2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch) | |
tree | 8da3ebb695ae55c69d0a58691403fb13d96a9476 /Modules/clinic/_opcode.c.h | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
parent | bbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff) | |
download | cpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz |
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Modules/clinic/_opcode.c.h')
-rw-r--r-- | Modules/clinic/_opcode.c.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 513cbfdad8..77f31d9b5f 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -9,23 +9,27 @@ PyDoc_STRVAR(_opcode_stack_effect__doc__, "Compute the stack effect of the opcode."); #define _OPCODE_STACK_EFFECT_METHODDEF \ - {"stack_effect", (PyCFunction)_opcode_stack_effect, METH_VARARGS, _opcode_stack_effect__doc__}, + {"stack_effect", (PyCFunction)_opcode_stack_effect, METH_FASTCALL, _opcode_stack_effect__doc__}, static int _opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg); static PyObject * -_opcode_stack_effect(PyObject *module, PyObject *args) +_opcode_stack_effect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; int opcode; PyObject *oparg = Py_None; int _return_value; - if (!PyArg_ParseTuple(args, "i|O:stack_effect", + if (!_PyArg_ParseStack(args, nargs, "i|O:stack_effect", &opcode, &oparg)) { goto exit; } + + if (!_PyArg_NoStackKeywords("stack_effect", kwnames)) { + goto exit; + } _return_value = _opcode_stack_effect_impl(module, opcode, oparg); if ((_return_value == -1) && PyErr_Occurred()) { goto exit; @@ -35,4 +39,4 @@ _opcode_stack_effect(PyObject *module, PyObject *args) exit: return return_value; } -/*[clinic end generated code: output=4d91c6a765097853 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=62858005ac85baa9 input=a9049054013a1b77]*/ |