Python 3.9 support for -builtin

Add missing initializer for member ‘_heaptypeobject::ht_module’ to complete
Python 3.9 support.
This commit is contained in:
William S Fulton 2020-08-16 13:52:32 +01:00
commit e774fe5cfd
2 changed files with 8 additions and 0 deletions

View file

@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
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.

View file

@ -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("");