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:
parent
b819363117
commit
f733efd3c0
9 changed files with 51 additions and 4 deletions
15
Examples/test-suite/python_runtime_data_builtin.i
Normal file
15
Examples/test-suite/python_runtime_data_builtin.i
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Test swig_runtime_data with and without -builtin
|
||||
|
||||
%module python_runtime_data_builtin
|
||||
|
||||
%inline %{
|
||||
#ifdef SWIGPYTHON_BUILTIN
|
||||
bool is_python_builtin() { return true; }
|
||||
#else
|
||||
bool is_python_builtin() { return false; }
|
||||
#endif
|
||||
%}
|
||||
|
||||
%include std_vector.i
|
||||
|
||||
%template(vectord) std::vector<double>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue