[134837] trunk/base

jmr at macports.org jmr at macports.org
Wed Apr 8 07:51:23 PDT 2015


Revision: 134837
          https://trac.macports.org/changeset/134837
Author:   jmr at macports.org
Date:     2015-04-08 07:51:23 -0700 (Wed, 08 Apr 2015)
Log Message:
-----------
replace eval with {*} in the last few applicable places

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports_util.tcl
    trunk/base/src/package1.0/portmpkg.tcl
    trunk/base/tests/test/library.tcl.in

Modified: trunk/base/src/macports1.0/macports_util.tcl
===================================================================
--- trunk/base/src/macports1.0/macports_util.tcl	2015-04-08 14:37:08 UTC (rev 134836)
+++ trunk/base/src/macports1.0/macports_util.tcl	2015-04-08 14:51:23 UTC (rev 134837)
@@ -112,7 +112,7 @@
     
         if {[llength $args] > 1} {
             set list [uplevel 1 [subst -nocommands {lindex [set $varName] $idx}]]
-            set item [eval ldindex list [lrange $args 1 end]]
+            set item [ldindex list {*}[lrange $args 1 end]]
             uplevel 1 [subst {lset $varName $idx [list $list]}]
         } else {
             set item [uplevel 1 [subst -nocommands {lindex [set $varName] $idx}]]

Modified: trunk/base/src/package1.0/portmpkg.tcl
===================================================================
--- trunk/base/src/package1.0/portmpkg.tcl	2015-04-08 14:37:08 UTC (rev 134836)
+++ trunk/base/src/package1.0/portmpkg.tcl	2015-04-08 14:51:23 UTC (rev 134837)
@@ -86,8 +86,8 @@
 
     # get the union of depends_run and depends_lib
     set depends {}
-    if {[info exists portinfo(depends_run)]} { eval "lappend depends $portinfo(depends_run)" }
-    if {[info exists portinfo(depends_lib)]} { eval "lappend depends $portinfo(depends_lib)" }
+    if {[info exists portinfo(depends_run)]} { lappend depends {*}$portinfo(depends_run) }
+    if {[info exists portinfo(depends_lib)]} { lappend depends {*}$portinfo(depends_lib) }
 
     foreach depspec $depends {
         set dep [_get_dep_port $depspec]

Modified: trunk/base/tests/test/library.tcl.in
===================================================================
--- trunk/base/tests/test/library.tcl.in	2015-04-08 14:37:08 UTC (rev 134836)
+++ trunk/base/tests/test/library.tcl.in	2015-04-08 14:51:23 UTC (rev 134837)
@@ -1,4 +1,4 @@
-eval ::tcltest::configure $::argv
+::tcltest::configure {*}$::argv
 
 set output_file "output"
 set work_dir "work"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150408/827b4011/attachment-0001.html>


More information about the macports-changes mailing list