@@ -146,13 +146,13 @@ set adefs_c [list] # Names of all arguments initialization set args [list] - # If we aren't creating a new interp, it must be the first argument - # If the definition of this proc already includes the interp - # argument, use it -- otherwise add one + # Determine if one of the arguments is a Tcl_Interp*, if not + # then we will need to create our own Tcl interpreter for + # local use set newInterp 1 foreach {type var} $adefs { if {$type == "Tcl_Interp*"} { set newInterp 0 set interp_name $var @@ -161,17 +161,22 @@ } } # Create the C-style argument definition foreach {type var} $adefs { + # Update definition of types lappend adefs_c [list $type $var] + + # Note the type for this variable set types($var) $type + # The Tcl interpreter is not added to the list of Tcl arguments if {$type == "Tcl_Interp*"} { continue } + # Update the list of arguments to pass to Tcl lappend args $var } if {[llength $adefs_c] == 0} { set adefs_c "void"