summaryrefslogtreecommitdiffstats
path: root/Modules/_opcode.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-03 20:53:51 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-03 20:53:51 (GMT)
commit1009bf18b38a8d36298575191dd8fdf43f8f9097 (patch)
tree18860fdef30c931dc2ea177059e96b69a49fa04f /Modules/_opcode.c
parent0759f84d6260bad1234b802212e73fdc5873d261 (diff)
downloadcpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.zip
cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.gz
cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.bz2
Issue #23501: Argumen Clinic now generates code into separate files by default.
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 fee388f..663bb21 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;