diff --git a/CHANGES.current b/CHANGES.current index 80de84169b..2a95482793 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.4.0 (in progress) =========================== +2025-06-20: wsfulton + [Python] #3196 Heap types are now generated by default instead of static types + for the builtin wrappers. Defining SWIG_HEAPTYPES to use heap types + is no longer required. + 2025-06-18: wsfulton [Python] #3196 Add support for -builtin and heap types turned on with -DSWIG_HEAPTYPES. This is an important step towards supporting a number of diff --git a/Lib/python/pyhead.swg b/Lib/python/pyhead.swg index 753aa06973..94935ccf93 100644 --- a/Lib/python/pyhead.swg +++ b/Lib/python/pyhead.swg @@ -1,4 +1,4 @@ -#if !defined(SWIGPYTHON_BUILTIN) && PY_VERSION_HEX >= 0x03030000 +#if PY_VERSION_HEX >= 0x03030000 && !defined(SWIG_NO_HEAPTYPES) #if !defined(SWIG_HEAPTYPES) #define SWIG_HEAPTYPES #endif diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index c0fc0c0b2d..7f072ea6a5 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -4458,7 +4458,7 @@ public: printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_clear"), "tp_clear", "inquiry"); printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_richcompare", richcompare_func), "tp_richcompare", "richcmpfunc"); printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_methods", methods_name), "tp_methods"); - // printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_members"), "tp_members"); + printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_members"), "tp_members"); printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_getset", getset_name), "tp_getset"); printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_hash", tp_hash), "tp_hash", "hashfunc"); printHeapTypesSlot(f, getHeapTypesSlot(n, "feature:python:tp_call"), "tp_call", "ternaryfunc");