summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-07-01 10:35:05 (GMT)
committerPetr Viktorin <pviktori@redhat.com>2019-07-01 10:35:05 (GMT)
commit4a2edc34a405150d0b23ecfdcb401e7cf59f4650 (patch)
treed4d88459768f103b76ce92536ba047b305ae0d24 /Python/compile.c
parentfc1fbe6099e826e8304eadf781af7c10d739fc40 (diff)
downloadcpython-4a2edc34a405150d0b23ecfdcb401e7cf59f4650.zip
cpython-4a2edc34a405150d0b23ecfdcb401e7cf59f4650.tar.gz
cpython-4a2edc34a405150d0b23ecfdcb401e7cf59f4650.tar.bz2
bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New as a compatibility wrapper (GH-13959)
Add PyCode_NewEx to be used internally and set PyCode_New as a compatibility wrapper
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 7bdf406..9cce8ae 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -5813,13 +5813,11 @@ makecode(struct compiler *c, struct assembler *a)
if (maxdepth < 0) {
goto error;
}
- co = PyCode_New(posonlyargcount+posorkeywordargcount, posonlyargcount,
- kwonlyargcount, nlocals_int, maxdepth, flags,
- bytecode, consts, names, varnames,
- freevars, cellvars,
- c->c_filename, c->u->u_name,
- c->u->u_firstlineno,
- a->a_lnotab);
+ co = PyCode_NewWithPosOnlyArgs(posonlyargcount+posorkeywordargcount,
+ posonlyargcount, kwonlyargcount, nlocals_int,
+ maxdepth, flags, bytecode, consts, names,
+ varnames, freevars, cellvars, c->c_filename,
+ c->u->u_name, c->u->u_firstlineno, a->a_lnotab);
error:
Py_XDECREF(consts);
Py_XDECREF(names);