summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2020-08-16 13:52:32 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2020-08-27 20:22:39 +0100
commite774fe5cfd564df8542545830213859de2f676c4 (patch)
tree9ebdc051a2f8629282f35ec21a3ed84edf30532e
parentbebb65597599f6df4092c847e1e5043bf48dcaf0 (diff)
downloadswig-e774fe5cfd564df8542545830213859de2f676c4.tar.gz
Python 3.9 support for -builtin
Add missing initializer for member ‘_heaptypeobject::ht_module’ to complete Python 3.9 support.
-rw-r--r--CHANGES.current4
-rw-r--r--Source/Modules/python.cxx4
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGES.current b/CHANGES.current
index c1bac0667..2eb67c929 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -8,6 +8,10 @@ Version 4.1.0 (in progress)
===========================
2020-08-16: wsfulton
+ [Python] Add missing initializer for member ‘_heaptypeobject::ht_module’ when using
+ -builtin to complete Python 3.9 support.
+
+2020-08-16: wsfulton
[Python] Remove PyEval_InitThreads() call for Python 3.7 and later as Python calls
it automatically now. This removes a deprecation warning when using Python 3.9.
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index c8c45df35..b437d2f6f 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -4308,6 +4308,10 @@ public:
// struct _dictkeysobject *ht_cached_keys;
printSlot(f, getSlot(n, "feature:python:ht_cached_keys"), "ht_cached_keys");
Printv(f, "#endif\n", NIL);
+
+ Printv(f, "#if PY_VERSION_HEX >= 0x03090000\n", NIL);
+ printSlot(f, getSlot(n, "feature:python:ht_module"), "ht_module", "PyObject *");
+ Printv(f, "#endif\n", NIL);
Printf(f, "};\n\n");
String *clientdata = NewString("");