Public Types | |
typedef std::map< K, T > | map_type |
Static Public Member Functions | |
static int | asptr (PyObject *obj, map_type **val) |
Definition at line 4727 of file SyFi_wrap.cc.
typedef std::map<K,T> swig::traits_asptr< std::map< K, T > >::map_type |
Definition at line 4728 of file SyFi_wrap.cc.
static int swig::traits_asptr< std::map< K, T > >::asptr | ( | PyObject * | obj, | |
map_type ** | val | |||
) | [inline, static] |
Definition at line 4729 of file SyFi_wrap.cc.
References swig::traits_asptr< Type >::asptr(), SyFi::p, run_all::res, SWIG_ConvertPtr, SWIG_ERROR, and SWIG_IsOK.
04729 { 04730 int res = SWIG_ERROR; 04731 if (PyDict_Check(obj)) { 04732 SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL); 04733 #if PY_VERSION_HEX >= 0x03000000 04734 /* In Python 3.x the ".items()" method return a dict_items object */ 04735 items = PySequence_Fast(items, ".items() havn't returned a sequence!"); 04736 #endif 04737 res = traits_asptr_stdseq<std::map<K,T>, std::pair<K, T> >::asptr(items, val); 04738 } else { 04739 map_type *p; 04740 res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0); 04741 if (SWIG_IsOK(res) && val) *val = p; 04742 } 04743 return res; 04744 }