SyFi
0.3
|
Public Types | |
typedef Seq | sequence |
typedef T | value_type |
typedef Seq::size_type | size_type |
typedef sequence::const_iterator | const_iterator |
Static Public Member Functions | |
static PyObject * | from (const sequence &seq) |
Definition at line 4738 of file SyFiPYTHON_wrap.cxx.
typedef sequence::const_iterator swig::traits_from_stdseq< Seq, T >::const_iterator |
Definition at line 4742 of file SyFiPYTHON_wrap.cxx.
typedef Seq swig::traits_from_stdseq< Seq, T >::sequence |
Definition at line 4739 of file SyFiPYTHON_wrap.cxx.
typedef Seq::size_type swig::traits_from_stdseq< Seq, T >::size_type |
Definition at line 4741 of file SyFiPYTHON_wrap.cxx.
typedef T swig::traits_from_stdseq< Seq, T >::value_type |
Definition at line 4740 of file SyFiPYTHON_wrap.cxx.
static PyObject* swig::traits_from_stdseq< Seq, T >::from | ( | const sequence & | seq | ) | [inline, static] |
Definition at line 4744 of file SyFiPYTHON_wrap.cxx.
References swig_type_info::clientdata, SWIG_NewPointerObj, and SWIG_POINTER_OWN.
{ #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS swig_type_info *desc = swig::type_info<sequence>(); if (desc && desc->clientdata) { return SWIG_NewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN); } #endif size_type size = seq.size(); if (size <= (size_type)INT_MAX) { PyObject *obj = PyTuple_New((int)size); int i = 0; for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) { PyTuple_SetItem(obj,i,swig::from<value_type>(*it)); } return obj; } else { PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); return NULL; } }