Fix overloading for non-pointers and NULL - Tcl

This commit is contained in:
William S Fulton 2018-12-29 14:55:43 +00:00
commit 12eb0f81ae
2 changed files with 54 additions and 1 deletions

View file

@ -125,7 +125,8 @@ SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swi
/* Pointer values must start with leading underscore */
while (*c != '_') {
*ptr = (void *) 0;
if (strcmp(c,"NULL") == 0) return SWIG_OK;
if (strcmp(c,"NULL") == 0)
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
/* Empty string: not a pointer */
if (*c == 0) return SWIG_ERROR;