Fix typemaps for arrays of objects and object pointers
These typemaps never worked, but this went unnoticed until now because the nonsensical "ctype" expansion generated by them still compiled. With types possibly having a namespace prefix, they didn't any longer, so define them correctly for the objects using "$resolved_type" and define the typemap for "void*[]" separately, as "$resolved_type" can't be used for it.
This commit is contained in:
parent
5bf1497d7b
commit
54af856d09
1 changed files with 5 additions and 2 deletions
|
|
@ -113,12 +113,15 @@ same_action(TM, size_t, ACTION, ACTION_CREF);
|
|||
same_macro_all_primitive_types_but_void(same_type,ctype);
|
||||
same_macro_all_primitive_types_but_void(cref_as_value,ctype);
|
||||
|
||||
// trivial typemap for arrays of void pointers to avoid applying the object typemaps to them
|
||||
%typemap(ctype) void*[ANY] "void **"
|
||||
|
||||
// objects
|
||||
%typemap(ctype) SWIGTYPE "$&resolved_type*"
|
||||
%typemap(ctype) SWIGTYPE * "$resolved_type*"
|
||||
%typemap(ctype) SWIGTYPE & "$*resolved_type*"
|
||||
%typemap(ctype) SWIGTYPE [ANY] "/*SWIGTYPE [ANY]*/ $1_ltype **"
|
||||
%typemap(ctype) SWIGTYPE * [ANY] "/*SWIGTYPE *[ANY] */ $1_ltype **"
|
||||
%typemap(ctype) SWIGTYPE [ANY] "$resolved_type*"
|
||||
%typemap(ctype) SWIGTYPE * [ANY] "$resolved_type**"
|
||||
%typemap(ctype) enum SWIGTYPE "int"
|
||||
%typemap(ctype) enum SWIGTYPE &, enum SWIGTYPE * "int *"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue