Support older PYTHON_API_VERSIONs for backwards compatibility.
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index 91cd27e..82380f6 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -151,9 +151,7 @@
#_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
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 @@
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 @@
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;