Tcl Source Code

Check-in [6b4fc5cf0f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge dup-removal into search loop so we avoid pre-processing efforts on data that are never used. Contributed patch from Brian Griffin.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6b4fc5cf0f187b0e84bf565eaec071bb61d366ef
User & Date: dgp 2016-08-26 13:49:07
Context
2016-08-30
13:07
Don't ever allow UTF-8 sequences of more than 4 characters to be generated or parsed, even when TCL_... check-in: 2de1551609 user: jan.nijtmans tags: trunk
2016-08-26
13:49
Merge dup-removal into search loop so we avoid pre-processing efforts on data that are never used. C... check-in: 6b4fc5cf0f user: dgp tags: trunk
13:46
Merge dup-removal into search loop so we avoid pre-processing efforts on data that are never used. C... check-in: 33fdf70e7f user: dgp tags: core-8-6-branch
2016-07-27
18:56
merge mark check-in: ac14beae58 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/auto.tcl.

118
119
120
121
122
123
124
125
126
127
128
129

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
	    lappend dirs [file join [file dirname $grandParentDir] \
			      $basename$patch library]
	}
    }
    # uniquify $dirs in order
    array set seen {}
    foreach i $dirs {
	# Take note that the [file normalize] below has been noted to cause
	# difficulties for the freewrap utility.  See Bug 1072136.  Until
	# freewrap resolves the matter, one might work around the problem by
	# disabling that branch.
	if {[interp issafe]} {

	    set norm $i
	} else {
	    set norm [file normalize $i]
	}
	if {[info exists seen($norm)]} {
	    continue
	}
	set seen($norm) {}
	lappend uniqdirs $i
    }
    set dirs $uniqdirs
    foreach i $dirs {
        set the_library $i
        set file [file join $i $initScript]

	# source everything when in a safe interpreter because we have a
	# source command, but no file exists command

        if {[interp issafe] || [file exists $file]} {







|
<
<
<

>








<
|
<
<







118
119
120
121
122
123
124
125



126
127
128
129
130
131
132
133
134
135

136


137
138
139
140
141
142
143
	    lappend dirs [file join [file dirname $grandParentDir] \
			      $basename$patch library]
	}
    }
    # uniquify $dirs in order
    array set seen {}
    foreach i $dirs {
	# Make sure $i is unique under normalization. Avoid repeated [source].



	if {[interp issafe]} {
	    # Safe interps have no [file normalize].
	    set norm $i
	} else {
	    set norm [file normalize $i]
	}
	if {[info exists seen($norm)]} {
	    continue
	}
	set seen($norm) {}




        set the_library $i
        set file [file join $i $initScript]

	# source everything when in a safe interpreter because we have a
	# source command, but no file exists command

        if {[interp issafe] || [file exists $file]} {