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

@ -0,0 +1,11 @@
import python_runtime_data_builtin as builtin
import python_runtime_data_nobuiltin as nobuiltin
assert builtin.is_python_builtin()
assert not nobuiltin.is_python_builtin()
for i in range(1, 5):
v1 = builtin.vectord([1.] * i)
assert len(v1) == i
v2 = nobuiltin.vectord([1.] * i)
assert len(v2) == i