summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-01-29 14:21:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-01-29 14:21:14 (GMT)
commit413c14a38212f4a842d28cf9aaa9d82c9c7f71bf (patch)
tree49040b25a1de7c5786756a2115cab90f4aca4b24
parent628d65bf41110410632aa9f7e3e4a42c67603f15 (diff)
parent4dfcbbea544e672812bc7d4de3b7571e14cccc22 (diff)
downloadtcl-413c14a38212f4a842d28cf9aaa9d82c9c7f71bf.zip
tcl-413c14a38212f4a842d28cf9aaa9d82c9c7f71bf.tar.gz
tcl-413c14a38212f4a842d28cf9aaa9d82c9c7f71bf.tar.bz2
merge 8.5
-rw-r--r--changes2
-rw-r--r--doc/tclvars.n5
-rw-r--r--generic/tclBasic.c7
-rw-r--r--tests/platform.test6
-rw-r--r--tests/safe.test2
5 files changed, 20 insertions, 2 deletions
diff --git a/changes b/changes
index 11aa8c5..3a93f5a 100644
--- a/changes
+++ b/changes
@@ -7975,4 +7975,6 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
2015-12-11 (bug)[c9eb6b] tolerate unset ::env(TZ) (gahr, nijtmans)
+2016-01-29 (TIP 440) tcl_platform(engine) -- Tcl implementation (mistachkin)
+
--- Released 8.5.19, January 31, 2016 --- http://core.tcl.tk/tcl/ for details
diff --git a/doc/tclvars.n b/doc/tclvars.n
index 84823e0..9aa14d5 100644
--- a/doc/tclvars.n
+++ b/doc/tclvars.n
@@ -254,6 +254,11 @@ so extension writers can specify which package to load depending on the
C run-time library that is in use. This is not an indication that this core
contains symbols.
.TP
+\fBengine\fR
+.
+The name of the Tcl language implementation. When the interpreter is first
+created, this is always set to the string \fBTcl\fR.
+.TP
\fBmachine\fR
The instruction set executed by this machine, such as
\fBintel\fR, \fBPPC\fR, \fB68k\fR, or \fBsun4m\fR. On UNIX machines, this
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 89d6b8f..44cf543 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -790,6 +790,13 @@ Tcl_CreateInterp(void)
TclInitEmbeddedConfigurationInformation(interp);
/*
+ * TIP #440: Declare the name of the script engine to be "Tcl".
+ */
+
+ Tcl_SetVar2(interp, "tcl_platform", "engine", "Tcl",
+ TCL_GLOBAL_ONLY);
+
+ /*
* Compute the byte order of this machine.
*/
diff --git a/tests/platform.test b/tests/platform.test
index 51b9067..2f1cd70 100644
--- a/tests/platform.test
+++ b/tests/platform.test
@@ -20,6 +20,10 @@ namespace eval ::tcl::test::platform {
testConstraint testCPUID [llength [info commands testcpuid]]
+test platform-1.0 {tcl_platform(engine)} {
+ set tcl_platform(engine)
+} {Tcl}
+
test platform-1.1 {TclpSetVariables: tcl_platform} {
interp create i
i eval {catch {unset tcl_platform(debug)}}
@@ -27,7 +31,7 @@ test platform-1.1 {TclpSetVariables: tcl_platform} {
set result [i eval {lsort [array names tcl_platform]}]
interp delete i
set result
-} {byteOrder machine os osVersion platform pointerSize user wordSize}
+} {byteOrder engine machine os osVersion platform pointerSize user wordSize}
# Test assumes twos-complement arithmetic, which is true of virtually
# everything these days. Note that this does *not* use wide(), and
diff --git a/tests/safe.test b/tests/safe.test
index 8879518..6784bb9 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -166,7 +166,7 @@ test safe-6.3 {test safe interpreters knowledge of the world} {
set r [lreplace $r $threaded $threaded]
}
set r
-} {byteOrder platform pointerSize wordSize}
+} {byteOrder engine platform pointerSize wordSize}
# more test should be added to check that hostname, nameofexecutable,
# aren't leaking infos, but they still do...