[51524] trunk/base/src/port1.0/portutil.tcl
jmr at macports.org
jmr at macports.org
Wed May 27 04:15:24 PDT 2009
Revision: 51524
http://trac.macports.org/changeset/51524
Author: jmr at macports.org
Date: 2009-05-27 04:15:23 -0700 (Wed, 27 May 2009)
Log Message:
-----------
rename args of options procs so that [option name] doesn't fail (blarg...)
Modified Paths:
--------------
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2009-05-27 10:34:06 UTC (rev 51523)
+++ trunk/base/src/port1.0/portutil.tcl 2009-05-27 11:15:23 UTC (rev 51524)
@@ -54,32 +54,33 @@
# option
# This is an accessor for Portfile options. Targets may use
# this in the same style as the standard Tcl "set" procedure.
-# name - the name of the option to read or write
+# option - the name of the option to read or write
+# not called 'name' because this would fail if its value was 'name'...
# value - an optional value to assign to the option
-proc option {name args} {
+proc option {option args} {
# XXX: right now we just transparently use globals
# eventually this will need to bridge the options between
# the Portfile's interpreter and the target's interpreters.
- global $name
+ global $option
if {[llength $args] > 0} {
- ui_debug "setting option $name to $args"
- set $name [lindex $args 0]
+ ui_debug "setting option $option to $args"
+ set $option [lindex $args 0]
}
- return [set $name]
+ return [set $option]
}
# exists
# This is an accessor for Portfile options. Targets may use
# this procedure to test for the existence of a Portfile option.
-# name - the name of the option to test for existence
+# option - the name of the option to test for existence
-proc exists {name} {
+proc exists {option} {
# XXX: right now we just transparently use globals
# eventually this will need to bridge the options between
# the Portfile's interpreter and the target's interpreters.
- global $name
- return [info exists $name]
+ global $option
+ return [info exists $option]
}
##
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090527/a5502743/attachment.html>
More information about the macports-changes
mailing list