[103056] users/cal/base-sqlite-portindex/src/port1.0/portutil.tcl
cal at macports.org
cal at macports.org
Tue Feb 12 10:29:10 PST 2013
Revision: 103056
https://trac.macports.org/changeset/103056
Author: cal at macports.org
Date: 2013-02-12 10:29:10 -0800 (Tue, 12 Feb 2013)
Log Message:
-----------
port1.0/portutil.tcl: changing options to sets: pass args by reference, not by value to preserve list structure
Modified Paths:
--------------
users/cal/base-sqlite-portindex/src/port1.0/portutil.tcl
Modified: users/cal/base-sqlite-portindex/src/port1.0/portutil.tcl
===================================================================
--- users/cal/base-sqlite-portindex/src/port1.0/portutil.tcl 2013-02-12 18:22:07 UTC (rev 103055)
+++ users/cal/base-sqlite-portindex/src/port1.0/portutil.tcl 2013-02-12 18:29:10 UTC (rev 103056)
@@ -85,9 +85,11 @@
return [info exists $option]
}
-proc set_union {option args} {
+proc set_union {option argsref} {
global $option
+ upvar $argsref args
+
foreach val $args {
if {[lsearch -exact [set $option] $val] == -1} {
lappend $option $val
@@ -95,9 +97,11 @@
}
}
-proc set_difference {option args} {
+proc set_difference {option argsref} {
global $option
+ upvar $argsref args
+
foreach val $args {
set $option [lsearch -all -inline -not -exact [set $option] $val]
}
@@ -113,7 +117,7 @@
if {![info exists user_options($option)]} {
set $option {}
- set_union $option $args
+ set_union $option args
}
}
@@ -129,7 +133,7 @@
if {![info exists $option]} {
set $option {}
}
- set_union $option $args
+ set_union $option args
}
}
@@ -142,7 +146,7 @@
global $option user_options option_procs
if {![info exists user_options($option)] && [info exists $option]} {
- set_difference $option $args
+ set_difference $option args
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130212/f5f43f81/attachment.html>
More information about the macports-changes
mailing list