summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-21 08:55:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-21 08:55:02 (GMT)
commit2cce06805f7f8960bc059c1fc206071a2ad1491a (patch)
tree36562cef50ed1984baad25f59e78c1b8b02f56b1
parent30c32418f67d6455d36bfeb1b8b4539ca5f23771 (diff)
parent5c1a56d36b45b4032778ee7f972181673a3a5ff0 (diff)
downloadtcl-2cce06805f7f8960bc059c1fc206071a2ad1491a.zip
tcl-2cce06805f7f8960bc059c1fc206071a2ad1491a.tar.gz
tcl-2cce06805f7f8960bc059c1fc206071a2ad1491a.tar.bz2
Merge 8.7
-rw-r--r--generic/tclMain.c2
-rw-r--r--library/init.tcl4
-rw-r--r--tests/init.test13
3 files changed, 16 insertions, 3 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 8b1ee3e..84c0638 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -118,7 +118,7 @@ static void Prompt(Tcl_Interp *interp, InteractiveState *isPtr);
static void StdinProc(ClientData clientData, int mask);
static void FreeMainInterp(ClientData clientData);
-#if !defined(_WIN32) || defined(UNICODE)
+#if !defined(_WIN32) || defined(UNICODE) && !defined(TCL_ASCII_MAIN)
static Tcl_ThreadDataKey dataKey;
/*
diff --git a/library/init.tcl b/library/init.tcl
index 790ff73..e7c2f71 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -60,13 +60,13 @@ namespace eval tcl {
if {$Dir ni $::auto_path} {
lappend ::auto_path $Dir
}
- catch {
+ if {[info exists ::tcl_pkgPath]} { catch {
foreach Dir $::tcl_pkgPath {
if {$Dir ni $::auto_path} {
lappend ::auto_path $Dir
}
}
- }
+ }}
if {![interp issafe]} {
variable Path [encoding dirs]
diff --git a/tests/init.test b/tests/init.test
index 2a81b52..a241c0b 100644
--- a/tests/init.test
+++ b/tests/init.test
@@ -18,6 +18,19 @@ if {"::tcltest" ni [namespace children]} {
# Clear out any namespaces called test_ns_*
catch {namespace delete {*}[namespace children :: test_ns_*]}
+test init-0.1 {no error on initialization phase (init.tcl)} -setup {
+ interp create slave
+} -body {
+ slave eval {
+ list [set v [info exists ::errorInfo]] \
+ [if {$v} {set ::errorInfo}] \
+ [set v [info exists ::errorCode]] \
+ [if {$v} {set ::errorCode}]
+ }
+} -cleanup {
+ interp delete slave
+} -result {0 {} 0 {}}
+
# Six cases - white box testing
test init-1.1 {auto_qualify - absolute cmd - namespace} {