git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
727c3bf
)
don't rely on the ability of perl 5.6.x to remove elements from arrays
author
Andrew Tridgell
<tridge@samba.org>
Tue, 16 Dec 2003 03:21:34 +0000
(
03:21
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 16 Dec 2003 03:21:34 +0000
(
03:21
+0000)
using delete(). This makes pidl portable back to perl 5.0.
(This used to be commit
9175293535246f55f50f52501ec451c951a94eb1
)
source4/build/pidl/util.pm
patch
|
blob
|
history
diff --git
a/source4/build/pidl/util.pm
b/source4/build/pidl/util.pm
index 8331e115d336737ce260dac154d7aafe645d8356..b732c185b20acdcf63e5f0bcc0171bf84e75f1ca 100644
(file)
--- a/
source4/build/pidl/util.pm
+++ b/
source4/build/pidl/util.pm
@@
-68,7
+68,10
@@
sub CleanData($)
if (ref($v) eq "ARRAY") {
foreach my $i (0 .. $#{$v}) {
CleanData($v->[$i]);
- if (ref($v->[$i]) eq "ARRAY" && $#{$v->[$i]}==-1) { delete($v->[$i]); next; }
+ if (ref($v->[$i]) eq "ARRAY" && $#{$v->[$i]}==-1) {
+ $v->[$i] = undef;
+ next;
+ }
}
# this removes any undefined elements from the array
@{$v} = grep { defined $_ } @{$v};