1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4
5 PyDoc_STRVAR(_opcode_stack_effect__doc__,
6 "stack_effect($module, opcode, oparg=None, /)\n"
7 "--\n"
8 "\n"
9 "Compute the stack effect of the opcode.");
10
11 #define _OPCODE_STACK_EFFECT_METHODDEF \
12 {"stack_effect", (PyCFunction)_opcode_stack_effect, METH_VARARGS, _opcode_stack_effect__doc__},
13
14 static int
15 _opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg);
16
17 static PyObject *
_opcode_stack_effect(PyObject * module,PyObject * args)18 _opcode_stack_effect(PyObject *module, PyObject *args)
19 {
20 PyObject *return_value = NULL;
21 int opcode;
22 PyObject *oparg = Py_None;
23 int _return_value;
24
25 if (!PyArg_ParseTuple(args, "i|O:stack_effect",
26 &opcode, &oparg)) {
27 goto exit;
28 }
29 _return_value = _opcode_stack_effect_impl(module, opcode, oparg);
30 if ((_return_value == -1) && PyErr_Occurred()) {
31 goto exit;
32 }
33 return_value = PyLong_FromLong((long)_return_value);
34
35 exit:
36 return return_value;
37 }
38 /*[clinic end generated code: output=4d91c6a765097853 input=a9049054013a1b77]*/
39