[swig] Don't let temporary shared_ptr go out of scope when taking pointer to it.
%{
// %typemap(directorin) (TYPE&) ()
// swig issue shared pointer check in wrappers even if arg is a ref
- {
SP::TYPE myptemp = createSPtr##TYPE($1);
$input = SWIG_NewPointerObj(SWIG_as_voidptr(&myptemp),
SWIGTYPE_p_std11__shared_ptrT_##TYPE##_t, 0);
- }
%}
%typemap(directorin) (const TYPE&) ()
%{
// %typemap(directorin) (const TYPE&) ()
// swig issue shared pointer check in wrappers even if arg is a ref
- {
SPC::TYPE myptemp = createSPtrConst##TYPE($1);
$input = SWIG_NewPointerObj(SWIG_as_voidptr(&myptemp),
SWIGTYPE_p_std11__shared_ptrT_##TYPE##_const_t, 0);
- }
%}
%shared_ptr(TYPE);
@@ -79,22 +75,18 @@ PY_REGISTER_WITHOUT_HEADER(TYPE)
%{
// %typemap(directorin) (TYPE&) ()
// swig issue shared pointer check in wrappers even if arg is a ref
- {
SP::TYPE myptemp = createSPtr##TYPE($1);
$input = SWIG_NewPointerObj(SWIG_as_voidptr(&myptemp),
SWIGTYPE_p_std11__shared_ptrT_##TYPE##_t, 0);
- }
%}
%typemap(directorin) (const TYPE&) ()
%{
// %typemap(directorin) (const TYPE&) ()
// swig issue shared pointer check in wrappers even if arg is a ref
- {
SPC::TYPE myptemp = createSPtrConst##TYPE($1);
$input = SWIG_NewPointerObj(SWIG_as_voidptr(&myptemp),
SWIGTYPE_p_std11__shared_ptrT_##TYPE##_const_t, 0);
- }
%}
%shared_ptr(TYPE);
