]> granicus.if.org Git - python/commitdiff
Support older PYTHON_API_VERSIONs for backwards compatibility.
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 6 Feb 2001 09:34:40 +0000 (09:34 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 6 Feb 2001 09:34:40 +0000 (09:34 +0000)
Modules/Setup.dist
Modules/pyexpat.c

index 91cd27ee5dcc31cb9c1be2b1855b6ca440085dc5..82380f603eb4c6045673123935cf7cfa9b5997d9 100644 (file)
@@ -151,9 +151,7 @@ GLHACK=-Dclear=__GLclear
 #_codecs _codecsmodule.c       # access to the builtin codecs and codec registry
 #_testcapi _testcapimodule.c    # Python C API test module
 
-#unicodedata unicodedata.c unicodedatabase.c
-                        # static Unicode character database
-#ucnhash ucnhash.c # Unicode Character Name expansion hash table
+#unicodedata unicodedata.c    # static Unicode character database
 
 #_locale _localemodule.c  # access to ISO C locale support
 
index f20adcb4f315787773a125ae92c0a717e407b569..00e4e9e133d11689940c6a87f1a4617f46429c5a 100644 (file)
@@ -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;