Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr
To fix overloading when using these types.
This commit is contained in:
parent
f0af17b324
commit
e97181ebc0
59 changed files with 442 additions and 2 deletions
|
|
@ -25,6 +25,12 @@
|
|||
%set_output(SWIG_NewPointerObj($1.release(), $descriptor(TYPE *), SWIG_POINTER_OWN | %newpointer_flags));
|
||||
%}
|
||||
|
||||
%typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER, equivalent="TYPE *", noblock=1) std::auto_ptr< TYPE > {
|
||||
void *vptr = 0;
|
||||
int res = SWIG_ConvertPtr($input, &vptr, $descriptor(TYPE *), 0);
|
||||
$1 = SWIG_CheckState(res);
|
||||
}
|
||||
|
||||
%template() std::auto_ptr< TYPE >;
|
||||
%enddef
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@
|
|||
%set_output(SWIG_NewPointerObj($1.release(), $descriptor(TYPE *), SWIG_POINTER_OWN | %newpointer_flags));
|
||||
%}
|
||||
|
||||
%typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER, equivalent="TYPE *", noblock=1) std::unique_ptr< TYPE > {
|
||||
void *vptr = 0;
|
||||
int res = SWIG_ConvertPtr($input, &vptr, $descriptor(TYPE *), 0);
|
||||
$1 = SWIG_CheckState(res);
|
||||
}
|
||||
|
||||
%template() std::unique_ptr< TYPE >;
|
||||
%enddef
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue