summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-16 03:21:34 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-16 03:21:34 +0000
commit6deece83dc9b115fb340b0b8173526602a7dd86d (patch)
treee32188aa6a8a4882042a12f2c140494575a88192 /source4/build/pidl
parent727c3bfdebf67e306e1ab15bb533e67b1e1b9090 (diff)
downloadsamba-6deece83dc9b115fb340b0b8173526602a7dd86d.tar.gz
samba-6deece83dc9b115fb340b0b8173526602a7dd86d.tar.bz2
samba-6deece83dc9b115fb340b0b8173526602a7dd86d.zip
don't rely on the ability of perl 5.6.x to remove elements from arrays
using delete(). This makes pidl portable back to perl 5.0. (This used to be commit 9175293535246f55f50f52501ec451c951a94eb1)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/util.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 8331e115d3..b732c185b2 100644
--- 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};