From 840bb19dcd0f4929396109f629b24dc4165dec7d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 19 Feb 2005 23:46:52 +0000 Subject: r5463: Make need_wire_pointer() return the number of required pointers rather then a bool. (This used to be commit d40a49c8a7ea85335383144b18b1ecfddc0c4ae0) --- source4/build/pidl/ndr.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/build/pidl') diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index cc11fdec86..f953445e89 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -166,15 +166,15 @@ sub array_type($) sub need_wire_pointer($) { my $e = shift; - my $pt; - - return 0 unless ($pt = pointer_type($e)); - if ($pt ne "ref") { - return 1; - } else { - return 0; + my $n = $e->{POINTERS}; + my $pt = pointer_type($e); + + if (defined($pt) and $pt eq "ref") { + $n--; } + + return $n; } # determine if an element is a pure scalar. pure scalars do not -- cgit