summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2006-09-22 01:26:20 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2006-09-22 01:26:20 (GMT)
commit44cc6dd45c93a8c04feeb48ceae17c11dcb71726 (patch)
tree32acbff94cb87475dcf718f476fd8fb8e668cff2 /generic/tclBasic.c
parentef5c6eb9131915179d1101e7398fca1e09e2e3f2 (diff)
downloadtcl-44cc6dd45c93a8c04feeb48ceae17c11dcb71726.zip
tcl-44cc6dd45c93a8c04feeb48ceae17c11dcb71726.tar.gz
tcl-44cc6dd45c93a8c04feeb48ceae17c11dcb71726.tar.bz2
* generic/tcl.decls: Implemented TIP #268, conditionally.
* generic/tclBasic.c: Define TCL_TIP268 to activate the new * generic/tclDecls.h: features. * generic/tclInt.h: * generic/tclPkg.c: * generic/tclStubInit.c: * generic/tclTest.c: * library/init.tcl * library/package.tcl: * tests/pkg.test: * tests/platform.test: * tests/safe.test: * doc/PkgRequire.3: FossilOrigin-Name: 78a272c42aaf7c6c9472f55bef7a82605b1cc2c6
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index e13d01e..d746ff5 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.75.2.22 2006/08/30 17:24:25 hobbs Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.75.2.23 2006/09/22 01:26:22 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -345,6 +345,12 @@ Tcl_CreateInterp()
Tcl_InitHashTable(&iPtr->packageTable, TCL_STRING_KEYS);
iPtr->packageUnknown = NULL;
+#ifdef TCL_TIP268
+ /* TIP #268 */
+ iPtr->packagePrefer = (getenv ("TCL_PKG_PREFER_LATEST") == NULL ?
+ PKG_PREFER_STABLE :
+ PKG_PREFER_LATEST);
+#endif
iPtr->cmdCount = 0;
iPtr->termOffset = 0;
TclInitLiteralTable(&(iPtr->literalTable));
@@ -572,10 +578,17 @@ Tcl_CreateInterp()
/*
* Register Tcl's version number.
+ * TIP #268: Full patchlevel instead of just major.minor
*/
+#ifndef TCL_TIP268
Tcl_PkgProvideEx(interp, "Tcl", TCL_VERSION, (ClientData) &tclStubs);
-
+#else
+ Tcl_SetVar2(interp, "tcl_platform", "tip,268", "1",
+ TCL_GLOBAL_ONLY);
+
+ Tcl_PkgProvideEx(interp, "Tcl", TCL_PATCH_LEVEL, (ClientData) &tclStubs);
+#endif
#ifdef Tcl_InitStubs
#undef Tcl_InitStubs
#endif