Index: tcc4tcl.tcl ================================================================== --- tcc4tcl.tcl +++ tcc4tcl.tcl @@ -171,11 +171,15 @@ } lappend args $var } - set adefs_c [join $adefs_c {, }] + if {[llength $adefs_c] == 0} { + set adefs_c "void" + } else { + set adefs_c [join $adefs_c {, }] + } # Determine how to return in failure if {$rtype != "void"} { if {[info exists returnErrorValue]} { set return_failure "return(${returnErrorValue})" Index: test.tcl ================================================================== --- test.tcl +++ test.tcl @@ -151,10 +151,17 @@ set retval [expr {$a + $b}] return $retval } $handle cwrap callToTcl {Tcl_Interp* ip int a int b} int -puts [$handle code] $handle go if {[callToTcl 3 5] != 8} { error "3 + 5 is 8, not [callToTcl 3 5]" } + +set handle [tcc4tcl::new] +$handle proc callToTcl1 {} float { + return 0.1 +} +$handle cwrap callToTcl1 {} float +$handle go +puts [callToTcl1]