|
SyFi
0.3
|
Public Types | |
| typedef std::map< K, T, Compare, Alloc > | map_type |
Static Public Member Functions | |
| static int | asptr (PyObject *obj, map_type **val) |
Definition at line 5205 of file SyFiPYTHON_wrap.cxx.
| typedef std::map<K,T,Compare,Alloc > swig::traits_asptr< std::map< K, T, Compare, Alloc > >::map_type |
Definition at line 5206 of file SyFiPYTHON_wrap.cxx.
| static int swig::traits_asptr< std::map< K, T, Compare, Alloc > >::asptr | ( | PyObject * | obj, |
| map_type ** | val | ||
| ) | [inline, static] |
Definition at line 5207 of file SyFiPYTHON_wrap.cxx.
References swig::asptr(), SyFi::p, run_all::res, SWIG_ConvertPtr, SWIG_ERROR, SWIG_IsOK, SWIG_PYTHON_THREAD_BEGIN_BLOCK, and SWIG_PYTHON_THREAD_END_BLOCK.
{
int res = SWIG_ERROR;
SWIG_PYTHON_THREAD_BEGIN_BLOCK;
if (PyDict_Check(obj)) {
SwigVar_PyObject items = PyObject_CallMethod(obj,(char *)"items",NULL);
#if PY_VERSION_HEX >= 0x03000000
/* In Python 3.x the ".items()" method returns a dict_items object */
items = PySequence_Fast(items, ".items() didn't return a sequence!");
#endif
res = traits_asptr_stdseq<map_type, std::pair<K, T> >::asptr(items, val);
} else {
map_type *p;
res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info<map_type>(),0);
if (SWIG_IsOK(res) && val) *val = p;
}
SWIG_PYTHON_THREAD_END_BLOCK;
return res;
}