From 7acced1e51ec8ab4788f84157160534dab84fa10 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Sun, 17 Jan 2016 14:53:51 -0800 Subject: Add the tcl_platform(engine) array element. --- Tcl_shipped.html | 1 + jim.c | 1 + jim_tcl.txt | 1 + tests/jim.test | 3 +++ 4 files changed, 6 insertions(+) diff --git a/Tcl_shipped.html b/Tcl_shipped.html index 71bbbf5..95df395 100644 --- a/Tcl_shipped.html +++ b/Tcl_shipped.html @@ -7887,6 +7887,7 @@ by the Tcl library.

tcl_platform(byteOrder)     = littleEndian
+tcl_platform(engine)        = Jim
 tcl_platform(os)            = Darwin
 tcl_platform(platform)      = unix
 tcl_platform(pointerSize)   = 8
diff --git a/jim.c b/jim.c
index 0c6825f..5be02c5 100644
--- a/jim.c
+++ b/jim.c
@@ -5479,6 +5479,7 @@ Jim_Interp *Jim_CreateInterp(void)
     Jim_SetVariableStrWithStr(i, JIM_LIBPATH, TCL_LIBRARY);
     Jim_SetVariableStrWithStr(i, JIM_INTERACTIVE, "0");
 
+    Jim_SetVariableStrWithStr(i, "tcl_platform(engine)", "Jim");
     Jim_SetVariableStrWithStr(i, "tcl_platform(os)", TCL_PLATFORM_OS);
     Jim_SetVariableStrWithStr(i, "tcl_platform(platform)", TCL_PLATFORM_PLATFORM);
     Jim_SetVariableStrWithStr(i, "tcl_platform(pathSeparator)", TCL_PLATFORM_PATH_SEPARATOR);
diff --git a/jim_tcl.txt b/jim_tcl.txt
index 899e230..3a50b0f 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -4984,6 +4984,7 @@ The following global variables are set by jimsh.
     example of the contents of this array.
 
     tcl_platform(byteOrder)     = littleEndian
+    tcl_platform(engine)        = Jim
     tcl_platform(os)            = Darwin
     tcl_platform(platform)      = unix
     tcl_platform(pointerSize)   = 8
diff --git a/tests/jim.test b/tests/jim.test
index b48522d..9c12ac7 100644
--- a/tests/jim.test
+++ b/tests/jim.test
@@ -3501,5 +3501,8 @@ test regression-1.2 {open/close from non-global namespace} {
 	expr {$f in [info channels]}
 } {0}
 
+test regression-1.3 {value of tcl_platform(engine)} {
+  set ::tcl_platform(engine)
+} {Jim}
 
 testreport
-- 
cgit v1.1