mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #23501: Argumen Clinic now generates code into separate files by default.
This commit is contained in:
parent
0759f84d62
commit
1009bf18b3
54 changed files with 9262 additions and 8731 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue