summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Modules/_opcode.c
diff options
context:
space:
mode:
authorshadchin <[email protected]>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Modules/_opcode.c
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Modules/_opcode.c')
-rw-r--r--contrib/tools/python3/src/Modules/_opcode.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/tools/python3/src/Modules/_opcode.c b/contrib/tools/python3/src/Modules/_opcode.c
index 71577484cf6..42a8732694a 100644
--- a/contrib/tools/python3/src/Modules/_opcode.c
+++ b/contrib/tools/python3/src/Modules/_opcode.c
@@ -15,20 +15,20 @@ _opcode.stack_effect -> int
opcode: int
oparg: object = None
/
- *
- jump: object = None
+ *
+ jump: object = None
Compute the stack effect of the opcode.
[clinic start generated code]*/
static int
-_opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg,
- PyObject *jump)
-/*[clinic end generated code: output=64a18f2ead954dbb input=461c9d4a44851898]*/
+_opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg,
+ PyObject *jump)
+/*[clinic end generated code: output=64a18f2ead954dbb input=461c9d4a44851898]*/
{
int effect;
int oparg_int = 0;
- int jump_int;
+ int jump_int;
if (HAS_ARG(opcode)) {
if (oparg == Py_None) {
PyErr_SetString(PyExc_ValueError,
@@ -44,21 +44,21 @@ _opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg,
"stack_effect: opcode does not permit oparg but oparg was specified");
return -1;
}
- if (jump == Py_None) {
- jump_int = -1;
- }
- else if (jump == Py_True) {
- jump_int = 1;
- }
- else if (jump == Py_False) {
- jump_int = 0;
- }
- else {
- PyErr_SetString(PyExc_ValueError,
- "stack_effect: jump must be False, True or None");
- return -1;
- }
- effect = PyCompile_OpcodeStackEffectWithJump(opcode, oparg_int, jump_int);
+ if (jump == Py_None) {
+ jump_int = -1;
+ }
+ else if (jump == Py_True) {
+ jump_int = 1;
+ }
+ else if (jump == Py_False) {
+ jump_int = 0;
+ }
+ else {
+ PyErr_SetString(PyExc_ValueError,
+ "stack_effect: jump must be False, True or None");
+ return -1;
+ }
+ effect = PyCompile_OpcodeStackEffectWithJump(opcode, oparg_int, jump_int);
if (effect == PY_INVALID_STACK_EFFECT) {
PyErr_SetString(PyExc_ValueError,
"invalid opcode or oparg");