diff options
author | andreas_kupries <akupries@shaw.ca> | 2006-09-22 01:26:21 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2006-09-22 01:26:21 (GMT) |
commit | 2448707dca1d9dffdab99e6db36d47f4ac849c0a (patch) | |
tree | 32acbff94cb87475dcf718f476fd8fb8e668cff2 /generic/tclBasic.c | |
parent | 46eeaabac457ed5157a0e04fe91ffb12314230a4 (diff) | |
download | tcl-2448707dca1d9dffdab99e6db36d47f4ac849c0a.zip tcl-2448707dca1d9dffdab99e6db36d47f4ac849c0a.tar.gz tcl-2448707dca1d9dffdab99e6db36d47f4ac849c0a.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.c | 17 |
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 |