mirror of https://github.com/swig/swig
Different capsule names for builtin changes entry
This commit is contained in:
parent
f733efd3c0
commit
3ab288dfa4
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue