summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2006-09-22 01:26:21 (GMT)
committerandreas_kupries <akupries@shaw.ca>2006-09-22 01:26:21 (GMT)
commite071f14d95c6a3e37911f58a3ca71da73b6a72d2 (patch)
tree32acbff94cb87475dcf718f476fd8fb8e668cff2 /generic/tclBasic.c
parente54225009c1133029084660b54b930783c1fbb94 (diff)
downloadtcl-e071f14d95c6a3e37911f58a3ca71da73b6a72d2.zip
tcl-e071f14d95c6a3e37911f58a3ca71da73b6a72d2.tar.gz
tcl-e071f14d95c6a3e37911f58a3ca71da73b6a72d2.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:
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