summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-11 16:06:44 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-07-11 16:06:44 (GMT)
commitb8bffd00e36251f0126d02b73f1e84c24b912ab9 (patch)
tree877b12f08f4266c9a01b6068d7e0e3a0fb80d520 /library
parenta0457efe80223c1380e9e0fc6a50c755fc7bbeda (diff)
parent2ead5632823207539bb83b296fb903b63ec595ff (diff)
downloadtcl-b8bffd00e36251f0126d02b73f1e84c24b912ab9.zip
tcl-b8bffd00e36251f0126d02b73f1e84c24b912ab9.tar.gz
tcl-b8bffd00e36251f0126d02b73f1e84c24b912ab9.tar.bz2
Merge 8.6
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl6
-rw-r--r--library/http/pkgIndex.tcl2
-rw-r--r--library/init.tcl45
-rw-r--r--[-rwxr-xr-x]library/reg/pkgIndex.tcl0
-rw-r--r--library/word.tcl6
5 files changed, 32 insertions, 27 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 0aa283f..a93e67b 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -11,7 +11,7 @@
package require Tcl 8.6-
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
-package provide http 2.9.1
+package provide http 2.9.2
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -1332,9 +1332,7 @@ proc http::Connected {token proto phost srvurl} {
set how POST
# The query channel must be blocking for the async Write to
# work properly.
- lassign [fconfigure $sock -translation] trRead trWrite
- fconfigure $state(-querychannel) -blocking 1 \
- -translation [list $trRead binary]
+ fconfigure $state(-querychannel) -blocking 1 -translation binary
set contDone 0
}
if {[info exists state(-method)] && ($state(-method) ne "")} {
diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl
index f9f1176..4f5eafb 100644
--- a/library/http/pkgIndex.tcl
+++ b/library/http/pkgIndex.tcl
@@ -1,2 +1,2 @@
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
-package ifneeded http 2.9.1 [list tclPkgSetup $dir http 2.9.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+package ifneeded http 2.9.2 [list tclPkgSetup $dir http 2.9.2 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
diff --git a/library/init.tcl b/library/init.tcl
index 5cc0fee..e6964e0 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -37,41 +37,46 @@ package require -exact Tcl 8.6.10
# tcl_pkgPath, which is set by the platform-specific initialization routines
# On UNIX it is compiled in
# On Windows, it is not used
+#
+# (Ticket 41c9857bdd) In a safe interpreter, this file does not set
+# ::auto_path (other than to {} if it is undefined). The caller, typically
+# a Safe Base command, is responsible for setting ::auto_path.
if {![info exists auto_path]} {
- if {[info exists env(TCLLIBPATH)]} {
+ if {[info exists env(TCLLIBPATH)] && (![interp issafe])} {
set auto_path $env(TCLLIBPATH)
} else {
set auto_path ""
}
}
namespace eval tcl {
- variable Dir
- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
- if {$Dir ni $::auto_path} {
- lappend ::auto_path $Dir
- }
- }
- set Dir [file join [file dirname [file dirname \
- [info nameofexecutable]]] lib]
- if {$Dir ni $::auto_path} {
- lappend ::auto_path $Dir
- }
- if {[info exists ::tcl_pkgPath]} { catch {
- foreach Dir $::tcl_pkgPath {
+ if {![interp issafe]} {
+ variable Dir
+ foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
if {$Dir ni $::auto_path} {
lappend ::auto_path $Dir
}
}
- }}
+ set Dir [file join [file dirname [file dirname \
+ [info nameofexecutable]]] lib]
+ if {$Dir ni $::auto_path} {
+ lappend ::auto_path $Dir
+ }
+ 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]
- set Dir [file join $::tcl_library encoding]
- if {$Dir ni $Path} {
+ variable Path [encoding dirs]
+ set Dir [file join $::tcl_library encoding]
+ if {$Dir ni $Path} {
lappend Path $Dir
encoding dirs $Path
- }
+ }
+ unset Dir Path
}
# TIP #255 min and max functions
diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl
index f2fb3b7..f2fb3b7 100755..100644
--- a/library/reg/pkgIndex.tcl
+++ b/library/reg/pkgIndex.tcl
diff --git a/library/word.tcl b/library/word.tcl
index 3e4bc3a..4e57479 100644
--- a/library/word.tcl
+++ b/library/word.tcl
@@ -146,7 +146,9 @@ proc tcl_startOfNextWord {str start} {
proc tcl_startOfPreviousWord {str start} {
variable ::tcl::WordBreakRE
set word {-1 -1}
- regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \
- result word
+ if {$start > 0} {
+ regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \
+ result word
+ }
return [lindex $word 0]
}