summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-07 08:03:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-07 08:03:10 (GMT)
commitc7943be5f2af9c61fd59c86c6d96840896fdc1da (patch)
treece8aaef67aa0fe96f08821954b71216a91a10eea /generic
parent3bbffed01d2dbaa523b752cf39da3868869ab30a (diff)
downloadtcl-c7943be5f2af9c61fd59c86c6d96840896fdc1da.zip
tcl-c7943be5f2af9c61fd59c86c6d96840896fdc1da.tar.gz
tcl-c7943be5f2af9c61fd59c86c6d96840896fdc1da.tar.bz2
Finish the TIP #416 implementation as specified (#define's were still missing). Added warning to "load" documentation. Added test case for using -global without specifying filename.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h8
-rw-r--r--generic/tclLoad.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 3f9f06a..c2159f7 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2364,6 +2364,14 @@ typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
/*
*----------------------------------------------------------------------------
+ * Definitions needed for the Tcl_LoadFile function. [TIP #416]
+ */
+
+#define TCL_LOAD_GLOBAL 1
+#define TCL_LOAD_LAZY 2
+
+/*
+ *----------------------------------------------------------------------------
* Single public declaration for NRE.
*/
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 22cfc65..5cacab1 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -151,9 +151,9 @@ Tcl_LoadObjCmd(
}
++objv; --objc;
if (LOAD_GLOBAL == (enum options) index) {
- flags |= 1;
+ flags |= TCL_LOAD_GLOBAL;
} else if (LOAD_LAZY == (enum options) index) {
- flags |= 2;
+ flags |= TCL_LOAD_LAZY;
} else {
break;
}