[svn:parrot] r42943 - trunk/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Tue Dec 8 10:53:16 UTC 2009
Author: fperrad
Date: Tue Dec 8 10:53:14 2009
New Revision: 42943
URL: https://trac.parrot.org/parrot/changeset/42943
Log:
[distutils] add a flavor of unlink for array
Modified:
trunk/runtime/parrot/library/distutils.pir
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Tue Dec 8 10:24:08 2009 (r42942)
+++ trunk/runtime/parrot/library/distutils.pir Tue Dec 8 10:53:14 2009 (r42943)
@@ -3424,6 +3424,11 @@
.sub 'newer' :multi(string, pmc)
.param string target
.param pmc depends
+ $I0 = does depends, 'array'
+ if $I0 goto L0
+ $S0 = depends
+ .tailcall newer(target, $S0)
+ L0:
$I0 = stat target, .STAT_EXISTS
if $I0 goto L1
.return (0)
@@ -3618,7 +3623,7 @@
=cut
-.sub 'unlink'
+.sub 'unlink' :multi(string)
.param string filename
.param int verbose :named('verbose') :optional
.param int has_verbose :opt_flag
@@ -3650,6 +3655,24 @@
rethrow e
.end
+.sub 'unlink' :multi(pmc)
+ .param pmc list
+ .param int verbose :named('verbose') :optional
+ $I0 = does list, 'array'
+ if $I0 goto L1
+ $S0 = list
+ unlink($S0, verbose :named('verbose'))
+ goto L2
+ L1:
+ $P0 = iter list
+ L3:
+ unless $P0 goto L2
+ $S0 = shift $P0
+ unlink($S0, verbose :named('verbose'))
+ goto L3
+ L2:
+.end
+
=item basename
=cut
More information about the parrot-commits
mailing list