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
This commit is contained in:
Eugene Toder 2022-03-18 00:08:01 -04:00
commit f733efd3c0
9 changed files with 51 additions and 4 deletions

View file

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