Static Public Member Functions | |
static int | asval (PyObject *obj, Type *val) |
Definition at line 3633 of file SyFi_wrap.cc.
static int swig::traits_asval< Type >::asval | ( | PyObject * | obj, | |
Type * | val | |||
) | [inline, static] |
Definition at line 3634 of file SyFi_wrap.cc.
References swig::asptr(), SyFi::p, run_all::res, SWIG_DelNewMask, SWIG_ERROR, SWIG_IsNewObj, and SWIG_IsOK.
Referenced by swig::asval().
03634 { 03635 if (val) { 03636 Type *p = 0; 03637 int res = traits_asptr<Type>::asptr(obj, &p); 03638 if (!SWIG_IsOK(res)) return res; 03639 if (p) { 03640 typedef typename noconst_traits<Type>::noconst_type noconst_type; 03641 *(const_cast<noconst_type*>(val)) = *p; 03642 if (SWIG_IsNewObj(res)){ 03643 delete p; 03644 res = SWIG_DelNewMask(res); 03645 } 03646 return res; 03647 } else { 03648 return SWIG_ERROR; 03649 } 03650 } else { 03651 return traits_asptr<Type>::asptr(obj, (Type **)(0)); 03652 } 03653 }