diff --git a/CHANGES.current b/CHANGES.current index 64e4c4402..56cb2c560 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -7,6 +7,14 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/ Version 4.1.0 (in progress) =========================== +2022-03-26: eltoder + [Python] #1684 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. + 2022-03-15: ianlancetaylor [Go] Don't convert arrays to pointers if there is a "gotype" typemap entry. diff --git a/Examples/test-suite/python/python_runtime_data_runme.py b/Examples/test-suite/python/python_runtime_data_runme.py index 341315ee3..063bf82d1 100644 --- a/Examples/test-suite/python/python_runtime_data_runme.py +++ b/Examples/test-suite/python/python_runtime_data_runme.py @@ -1,11 +1,15 @@ 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() +def swig_assert(a): + if not a: + raise RuntimeError("Failed") + +swig_assert(builtin.is_python_builtin()) +swig_assert(not nobuiltin.is_python_builtin()) for i in range(1, 5): v1 = builtin.vectord([1.] * i) - assert len(v1) == i + swig_assert(len(v1) == i) v2 = nobuiltin.vectord([1.] * i) - assert len(v2) == i + swig_assert(len(v2) == i)