From: Marcelo M. <mar...@us...> - 2006-01-06 21:38:07
|
Update of /cvsroot/swig/SWIG/Lib/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/Lib/python Modified Files: pystdcommon.swg pycontainer.swg Log Message: fix problem with containers reported by John Koleszar Index: pycontainer.swg =================================================================== RCS file: /cvsroot/swig/SWIG/Lib/python/pycontainer.swg,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** pycontainer.swg 2 Jan 2006 17:38:48 -0000 1.33 --- pycontainer.swg 6 Jan 2006 21:37:59 -0000 1.34 *************** *** 700,704 **** return SWIG_NEWOBJ; } else { ! return pyseq.check(); } } catch (std::exception& e) { --- 700,704 ---- return SWIG_NEWOBJ; } else { ! return pyseq.check() ? SWIG_OK : SWIG_ERROR; } } catch (std::exception& e) { Index: pystdcommon.swg =================================================================== RCS file: /cvsroot/swig/SWIG/Lib/python/pystdcommon.swg,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pystdcommon.swg 30 Dec 2005 01:14:23 -0000 1.15 --- pystdcommon.swg 6 Jan 2006 21:37:59 -0000 1.16 *************** *** 163,169 **** template <class Type> struct traits_check<Type, value_category> { ! static int check(PyObject *obj) { ! int res = asval(obj, (Type *)(0)); ! return obj && SWIG_IsOK(res) ? res : 0; } }; --- 163,169 ---- template <class Type> struct traits_check<Type, value_category> { ! static bool check(PyObject *obj) { ! int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; ! return SWIG_IsOK(res) ? true : false; } }; *************** *** 171,182 **** template <class Type> struct traits_check<Type, pointer_category> { ! static int check(PyObject *obj) { ! int res = asptr(obj, (Type **)(0)); ! return obj && SWIG_IsOK(res) ? res : 0; } }; template <class Type> ! inline int check(PyObject *obj) { return traits_check<Type, typename traits<Type>::category>::check(obj); } --- 171,182 ---- template <class Type> struct traits_check<Type, pointer_category> { ! static bool check(PyObject *obj) { ! int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; ! return SWIG_IsOK(res) ? true : false; } }; template <class Type> ! inline bool check(PyObject *obj) { return traits_check<Type, typename traits<Type>::category>::check(obj); } |