summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-09-06 19:23:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-09-06 19:23:55 (GMT)
commit36aea954df0e2ceb69fe8f6dfd853aa4972d5673 (patch)
tree4c0e6d9f93ea7fff25ba3cdb17e9878c72245dcd
parentfa9ca5327da10d6516693b272a082e03a255c835 (diff)
downloadtcl-36aea954df0e2ceb69fe8f6dfd853aa4972d5673.zip
tcl-36aea954df0e2ceb69fe8f6dfd853aa4972d5673.tar.gz
tcl-36aea954df0e2ceb69fe8f6dfd853aa4972d5673.tar.bz2
* generic/tclInterp.c (Tcl_Init): Removed constraint on ability
to define a custom [tclInit] before calling Tcl_Init(). Until now the custom command had to be a proc. Now it can be any command.
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclInterp.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b883584..9c18ed7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2007-09-06 Don Porter <dgp@users.sourceforge.net>
+ * generic/tclInterp.c (Tcl_Init): Removed constraint on ability
+ to define a custom [tclInit] before calling Tcl_Init(). Until now
+ the custom command had to be a proc. Now it can be any command.
+
* generic/tclInt.decls: New internal routine TclBackgroundException()
* generic/tclEvent.c: that for the first time permits non-TCL_ERROR
exceptions to trigger [interp bgerror] handling. Closes a gap in
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index a42c339..781e5b5 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInterp.c,v 1.77 2007/09/06 18:13:20 dgp Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.78 2007/09/06 19:23:56 dgp Exp $
*/
#include "tclInt.h"
@@ -338,11 +338,11 @@ Tcl_Init(
* will be set as the value of tcl_library.
*
* Note that this entire search mechanism can be bypassed by defining an
- * alternate tclInit function before calling Tcl_Init().
+ * alternate tclInit command before calling Tcl_Init().
*/
return Tcl_Eval(interp,
-"if {[info proc tclInit]==\"\"} {\n"
+"if {[namespace which -command tclInit] eq \"\"} {\n"
" proc tclInit {} {\n"
" global tcl_libPath tcl_library env tclDefaultLibrary\n"
" rename tclInit {}\n"