summaryrefslogtreecommitdiff
path: root/Modules/_opcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_opcode.c')
-rw-r--r--Modules/_opcode.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/Modules/_opcode.c b/Modules/_opcode.c
index fee388f596..663bb21a5f 100644
--- a/Modules/_opcode.c
+++ b/Modules/_opcode.c
@@ -6,6 +6,8 @@ module _opcode
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=117442e66eb376e6]*/
+#include "clinic/_opcode.c.h"
+
/*[clinic input]
_opcode.stack_effect -> int
@@ -17,42 +19,9 @@ _opcode.stack_effect -> int
Compute the stack effect of the opcode.
[clinic start generated code]*/
-PyDoc_STRVAR(_opcode_stack_effect__doc__,
-"stack_effect($module, opcode, oparg=None, /)\n"
-"--\n"
-"\n"
-"Compute the stack effect of the opcode.");
-
-#define _OPCODE_STACK_EFFECT_METHODDEF \
- {"stack_effect", (PyCFunction)_opcode_stack_effect, METH_VARARGS, _opcode_stack_effect__doc__},
-
-static int
-_opcode_stack_effect_impl(PyModuleDef *module, int opcode, PyObject *oparg);
-
-static PyObject *
-_opcode_stack_effect(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- int opcode;
- PyObject *oparg = Py_None;
- int _return_value;
-
- if (!PyArg_ParseTuple(args,
- "i|O:stack_effect",
- &opcode, &oparg))
- goto exit;
- _return_value = _opcode_stack_effect_impl(module, opcode, oparg);
- if ((_return_value == -1) && PyErr_Occurred())
- goto exit;
- return_value = PyLong_FromLong((long)_return_value);
-
-exit:
- return return_value;
-}
-
static int
_opcode_stack_effect_impl(PyModuleDef *module, int opcode, PyObject *oparg)
-/*[clinic end generated code: output=9e1133f8d587bc67 input=2d0a9ee53c0418f5]*/
+/*[clinic end generated code: output=1fcafd5596c6b050 input=2d0a9ee53c0418f5]*/
{
int effect;
int oparg_int = 0;