From f748c7a6e92b2972bc81d4577c52876f34aa00a2 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Thu, 31 Aug 2000 18:22:40 +0000 Subject: [PATCH] Fixed problem in void pointer handling. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@766 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules1.1/tcl8.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Source/Modules1.1/tcl8.cxx b/Source/Modules1.1/tcl8.cxx index f9fc482bf..d23e2642a 100644 --- a/Source/Modules1.1/tcl8.cxx +++ b/Source/Modules1.1/tcl8.cxx @@ -381,11 +381,19 @@ TCL8::create_function(char *name, char *iname, SwigType *d, ParmList *l) { break; case T_POINTER: case T_ARRAY: case T_REFERENCE: - SwigType_remember(pt); - Putc('p',argstr); - Printv(args, ",&", target, ", SWIGTYPE", SwigType_manglestr(pt), 0); - break; - + { + SwigType *lt; + SwigType_remember(pt); + Putc('p',argstr); + lt = Swig_clocal_type(pt); + if (Cmp(lt,"p.void") == 0) { + Printv(args, ",&", target, ", 0", 0); + } else { + Printv(args, ",&", target, ", SWIGTYPE", SwigType_manglestr(pt), 0); + } + Delete(lt); + break; + } default : Printf(stderr,"%s : Line %d: Unable to use type %s as a function argument.\n", input_file, line_number, SwigType_str(pt,0));