Index: tcc4tcl.tcl ================================================================== --- tcc4tcl.tcl +++ tcc4tcl.tcl @@ -58,29 +58,29 @@ }] return $handle } - proc _linktclcommand {cSymbol tclCommand} { + proc _linktclcommand {handle cSymbol tclCommand} { upvar #0 $handle state lappend state(procs) $cSymbol $tclCommand } - proc _add_include_path {args} { + proc _add_include_path {handle args} { upvar #0 $handle state lappend state(add_inc_path) {*}$args } - proc _add_library_path {args} { + proc _add_library_path {handle args} { upvar #0 $handle state lappend state(add_lib_path) {*}$args } - proc _add_library {args} { + proc _add_library {handle args} { upvar #0 $handle state lappend state(add_lib) {*}$args } @@ -108,10 +108,15 @@ proc _tk {handle} { upvar #0 $handle state set state(tk) 1 } + + proc _delete {handle} { + rename $handle "" + unset $handle + } proc _go {handle {outputOnly 0}} { variable dir upvar #0 $handle state Index: test.tcl ================================================================== --- test.tcl +++ test.tcl @@ -67,8 +67,9 @@ $handle cproc test5 {int i} int { return(i + 42); } if {[$handle code] == ""} { error "[list $handle code] did not give code output" } $handle cproc test6 {int i} int { return(i + 42); } +$handle add_library_path . $handle go puts [test5 1] puts [test6 1]