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:
parent
e9dc2e8dc9
commit
c62cb6180e
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue