SyFi
0.3
|
Static Public Member Functions | |
static int | asval (PyObject *obj, Type *val) |
Definition at line 3917 of file SyFiPYTHON_wrap.cxx.
static int swig::traits_asval< Type >::asval | ( | PyObject * | obj, |
Type * | val | ||
) | [inline, static] |
Definition at line 3918 of file SyFiPYTHON_wrap.cxx.
References swig::asptr(), SyFi::p, run_all::res, SWIG_DelNewMask, SWIG_ERROR, SWIG_IsNewObj, and SWIG_IsOK.
{ if (val) { Type *p = 0; int res = traits_asptr<Type>::asptr(obj, &p); if (!SWIG_IsOK(res)) return res; if (p) { typedef typename noconst_traits<Type>::noconst_type noconst_type; *(const_cast<noconst_type*>(val)) = *p; if (SWIG_IsNewObj(res)){ delete p; res = SWIG_DelNewMask(res); } return res; } else { return SWIG_ERROR; } } else { return traits_asptr<Type>::asptr(obj, (Type **)(0)); } }