@@ -160,10 +160,11 @@ break } } # Create the C-style argument definition + ## Create a list of all arguments foreach {type var} $adefs { # Update definition of types lappend adefs_c [list $type $var] # Note the type for this variable @@ -176,10 +177,11 @@ # Update the list of arguments to pass to Tcl lappend args $var } + ## Convert that list into something we can use in a C prototype if {[llength $adefs_c] == 0} { set adefs_c "void" } else { set adefs_c [join $adefs_c {, }] } @@ -292,10 +294,11 @@ default { return -code error "Unknown type: $type" } } + # If we don't have a procedure to call, set the variables locally if {$procname == ""} { _ccode $handle " if (!Tcl_ObjSetVar2(${interp_name}, Tcl_NewStringObj(\"${arg}\", -1), NULL, _$arg, 0)) $return_failure;" } } _ccode $handle ""