diff options
author | Eugene Toder <eltoder@gmail.com> | 2022-03-18 00:08:01 -0400 |
---|---|---|
committer | Eugene Toder <eltoder@gmail.com> | 2022-03-18 13:44:54 -0400 |
commit | f733efd3c0e1863c0a315af5c741f879c8ee1db4 (patch) | |
tree | ba23ca5e027f528f386b2370103f522828d1b77f /Source/Modules/python.cxx | |
parent | b8193631175d668890d9bcbb0e964f36affa2e12 (diff) | |
download | swig-f733efd3c0e1863c0a315af5c741f879c8ee1db4.tar.gz |
Use different capsule names with and without -builtin
Types generated with and without -builtin are not compatible. Mixing
them in a common type list leads to crashes. Avoid this by using
different capsule names: "type_pointer_capsule" without -builtin and
"type_pointer_capsule_builtin" with.
See #1684
Diffstat (limited to 'Source/Modules/python.cxx')
-rw-r--r-- | Source/Modules/python.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 69c13db48..e3b6faeed 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -4234,6 +4234,9 @@ public: printSlot(f, getSlot(n, "feature:python:am_await"), "am_await", "unaryfunc"); printSlot(f, getSlot(n, "feature:python:am_aiter"), "am_aiter", "unaryfunc"); printSlot(f, getSlot(n, "feature:python:am_anext"), "am_anext", "unaryfunc"); + Printv(f, "# if PY_VERSION_HEX >= 0x030a0000\n", NIL); + printSlot(f, getSlot(n, "feature:python:am_send"), "am_send", "sendfunc"); + Printv(f, "# endif\n", NIL); Printf(f, " },\n"); Printv(f, "#endif\n", NIL); |