mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
Support older PYTHON_API_VERSIONs for backwards compatibility.
This commit is contained in:
parent
fe28ca09a5
commit
76192ee4f5
2 changed files with 8 additions and 5 deletions
|
@ -151,9 +151,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
#_codecs _codecsmodule.c # access to the builtin codecs and codec registry
|
#_codecs _codecsmodule.c # access to the builtin codecs and codec registry
|
||||||
#_testcapi _testcapimodule.c # Python C API test module
|
#_testcapi _testcapimodule.c # Python C API test module
|
||||||
|
|
||||||
#unicodedata unicodedata.c unicodedatabase.c
|
#unicodedata unicodedata.c # static Unicode character database
|
||||||
# static Unicode character database
|
|
||||||
#ucnhash ucnhash.c # Unicode Character Name expansion hash table
|
|
||||||
|
|
||||||
#_locale _localemodule.c # access to ISO C locale support
|
#_locale _localemodule.c # access to ISO C locale support
|
||||||
|
|
||||||
|
|
|
@ -257,8 +257,10 @@ getcode(enum HandlerTypes slot, char* func_name, int lineno)
|
||||||
nulltuple, /* consts */
|
nulltuple, /* consts */
|
||||||
nulltuple, /* names */
|
nulltuple, /* names */
|
||||||
nulltuple, /* varnames */
|
nulltuple, /* varnames */
|
||||||
|
#if PYTHON_API_VERSION >= 1010
|
||||||
nulltuple, /* freevars */
|
nulltuple, /* freevars */
|
||||||
nulltuple, /* cellvars */
|
nulltuple, /* cellvars */
|
||||||
|
#endif
|
||||||
filename, /* filename */
|
filename, /* filename */
|
||||||
name, /* name */
|
name, /* name */
|
||||||
lineno, /* firstlineno */
|
lineno, /* firstlineno */
|
||||||
|
@ -290,8 +292,11 @@ call_with_frame(PyCodeObject *c, PyObject* func, PyObject* args)
|
||||||
tstate, /*back*/
|
tstate, /*back*/
|
||||||
c, /*code*/
|
c, /*code*/
|
||||||
tstate->frame->f_globals, /*globals*/
|
tstate->frame->f_globals, /*globals*/
|
||||||
NULL, /*locals*/
|
NULL /*locals*/
|
||||||
NULL); /* closure */
|
#if PYTHON_API_VERSION >= 1010
|
||||||
|
,NULL /*closure*/
|
||||||
|
#endif
|
||||||
|
);
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
tstate->frame = f;
|
tstate->frame = f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue