From: William K. Foster <wkf@si...> - 2006-01-24 22:14:51
If you have a default pointer map in tcl and pass in an
invalid value which begins with an underscore, the tcl
swig assumes it is a pointer, but
SWIG_Tcl_ConvertPtrFromString() calls SWIG_UnpackData()
and finds it is no good and returns a NULL char * to
SWIG_Tcl_ConvertPtrFromString() which stores the value
in variable c. This NULL is then passed to
SWIG_TypeCheck() which calls strcmp with the NULL
passed in via c as the second argument and strcmp()
SEGVs following the NULL pointer.
Fix would be to generate code instead for
SWIG_TypeCheck body as:
(strcmp(iter->type->name, c) == 0) : false, ty);
All I did is add check for c being non-NULL before
Is there an easy typemap to workaround this issue?
Get latest updates about Open Source Projects, Conferences and News.