aboutsummaryrefslogtreecommitdiff
path: root/make-c-ext.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-07-28 14:39:30 +1000
committerSteve Bennett <steveb@workware.net.au>2011-07-29 10:12:54 +1000
commit1669335e1c8aa6a2374cc3796c6d9d471becae82 (patch)
tree9572925835521ba39948c24fbbb24fba66b1a72e /make-c-ext.tcl
parent3a8ccfdd13dff59e55287f7dfb9679ac59add9f9 (diff)
downloadjimtcl-1669335e1c8aa6a2374cc3796c6d9d471becae82.zip
jimtcl-1669335e1c8aa6a2374cc3796c6d9d471becae82.tar.gz
jimtcl-1669335e1c8aa6a2374cc3796c6d9d471becae82.tar.bz2
Add Jim_EvalSource() to replace Jim_Eval_Named()
Since the line number should correspond to the first line of the script, it is easier to use with __LINE__ if the filename and line number are before the script. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'make-c-ext.tcl')
-rw-r--r--make-c-ext.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/make-c-ext.tcl b/make-c-ext.tcl
index 7e506ee..fd1a056 100644
--- a/make-c-ext.tcl
+++ b/make-c-ext.tcl
@@ -32,7 +32,7 @@ set pkgname [file rootname $basename]
lappend lines "int Jim_${pkgname}Init(Jim_Interp *interp)"
lappend lines "\{"
lappend lines "\tif (Jim_PackageProvide(interp, \"$pkgname\", \"1.0\", JIM_ERRMSG)) return JIM_ERR;"
-lappend lines "\treturn Jim_Eval_Named(interp, [join $sourcelines \n], \"$basename\", 1);"
+lappend lines "\treturn Jim_EvalSource(interp, \"$basename\", 1, [join $sourcelines \n]);"
lappend lines "\}"
puts [join $lines \n]