diff options
Diffstat (limited to 'Lib/octave/std_auto_ptr.i')
-rw-r--r-- | Lib/octave/std_auto_ptr.i | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/octave/std_auto_ptr.i b/Lib/octave/std_auto_ptr.i index d062886e4..3d7ae8ba1 100644 --- a/Lib/octave/std_auto_ptr.i +++ b/Lib/octave/std_auto_ptr.i @@ -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 |