[svn:parrot] r42839 - trunk/runtime/parrot/library

fperrad at svn.parrot.org fperrad at svn.parrot.org
Tue Dec 1 22:46:19 UTC 2009


Author: fperrad
Date: Tue Dec  1 22:46:12 2009
New Revision: 42839
URL: https://trac.parrot.org/parrot/changeset/42839

Log:
[distutils] partial revert of r42838. Restore the previous semantic.

Modified:
   trunk/runtime/parrot/library/distutils.pir

Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir	Tue Dec  1 20:49:06 2009	(r42838)
+++ trunk/runtime/parrot/library/distutils.pir	Tue Dec  1 22:46:12 2009	(r42839)
@@ -2340,11 +2340,11 @@
 
 =item manifest_includes
 
-string with pathname or pattern separated by space
+array of pathname or a single pathname
 
 =item manifest_excludes
 
-string with pathname or pattern separated by space
+array of pathname or a single pathname
 
 =item pbc_pir
 
@@ -2453,25 +2453,16 @@
 
     $I0 = exists kv['manifest_includes']
     unless $I0 goto L13
-    $S1 = kv['manifest_includes']
-    _manifest_add_glob(needed, $S1)
+    $P1 = kv['manifest_includes']
+    _manifest_add_array(needed, $P1)
   L13:
 
-    generated = new 'Hash'
     $I0 = exists kv['manifest_excludes']
     unless $I0 goto L14
-    $S1 = kv['manifest_excludes']
-    _manifest_add_glob(generated, $S1)
+    $P1 = kv['manifest_excludes']
+    _manifest_del_array(needed, $P1)
   L14:
 
-    $P0 = iter generated
-  L15:
-    unless $P0 goto L16
-    $S0 = shift $P0
-    delete needed[$S0]
-    goto L15
-  L16:
-
     $P1 = iter needed
     $I0 = elements $P1
     inc $I0
@@ -2537,19 +2528,32 @@
   L3:
 .end
 
+.sub '_manifest_del_array' :anon
+    .param pmc needed
+    .param pmc array
+    $I0 = does array, 'array'
+    unless $I0 goto L1
+    $P0 = iter array
+  L2:
+    unless $P0 goto L3
+    $S0 = shift $P0
+    delete needed[$S0]
+    goto L2
+  L1:
+    $S0 = array
+    delete needed[$S0]
+  L3:
+.end
+
 .sub '_manifest_add_glob' :anon
     .param pmc needed
     .param string str
-    $P0 = split ' ', str
+    $P0 = glob(str)
   L1:
     unless $P0 goto L2
     $S0 = shift $P0
-    $P1 = glob($S0)
-  L3:
-    unless $P1 goto L1
-    $S1 = shift $P1
-    needed[$S1] = 1
-    goto L3
+    needed[$S0] = 1
+    goto L1
   L2:
 .end
 


More information about the parrot-commits mailing list