always pass in non-null value for newmemory parameter in the casting function

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10243 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-02-10 21:34:56 +00:00
commit c62cb6180e

View file

@ -1097,8 +1097,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
}
if (ty) {
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
if (!tc) return SWIG_ERROR;
*ptr = SWIG_TypeCast(tc,vptr,0);
if (tc) {
int newmemory = 0;
*ptr = SWIG_TypeCast(tc,vptr,&newmemory);
assert(!newmemory); /* newmemory handling not yet implemented */
} else {
return SWIG_ERROR;
}
} else {
*ptr = vptr;
}