diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-02-06 09:34:40 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-02-06 09:34:40 (GMT) |
commit | 76192ee4f529f95af0bd3e03de9eba7ef31fbfbd (patch) | |
tree | f96b38ca5c4ce343629112254fc1f854b4afc847 /Modules/pyexpat.c | |
parent | fe28ca09a5332d160adba07052bb66693d6a6b66 (diff) | |
download | cpython-76192ee4f529f95af0bd3e03de9eba7ef31fbfbd.zip cpython-76192ee4f529f95af0bd3e03de9eba7ef31fbfbd.tar.gz cpython-76192ee4f529f95af0bd3e03de9eba7ef31fbfbd.tar.bz2 |
Support older PYTHON_API_VERSIONs for backwards compatibility.
Diffstat (limited to 'Modules/pyexpat.c')
-rw-r--r-- | Modules/pyexpat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index f20adcb..00e4e9e 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -257,8 +257,10 @@ getcode(enum HandlerTypes slot, char* func_name, int lineno) nulltuple, /* consts */ nulltuple, /* names */ nulltuple, /* varnames */ +#if PYTHON_API_VERSION >= 1010 nulltuple, /* freevars */ nulltuple, /* cellvars */ +#endif filename, /* filename */ name, /* name */ lineno, /* firstlineno */ @@ -290,8 +292,11 @@ call_with_frame(PyCodeObject *c, PyObject* func, PyObject* args) tstate, /*back*/ c, /*code*/ tstate->frame->f_globals, /*globals*/ - NULL, /*locals*/ - NULL); /* closure */ + NULL /*locals*/ +#if PYTHON_API_VERSION >= 1010 + ,NULL /*closure*/ +#endif + ); if (f == NULL) return NULL; tstate->frame = f; |