summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-11-30 17:07:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:53 -0500
commita9cdc6321ac1aeafae6200afefd12f83c5786868 (patch)
tree03b81597f0efffa351d8c2d3b070767999281522 /source4/pidl/lib/Parse/Pidl
parentfd18ab334a5b9aea301f8c5ba33b380b7ef76038 (diff)
downloadsamba-a9cdc6321ac1aeafae6200afefd12f83c5786868.tar.gz
samba-a9cdc6321ac1aeafae6200afefd12f83c5786868.tar.bz2
samba-a9cdc6321ac1aeafae6200afefd12f83c5786868.zip
r11974: only look at $pl->{POINTER_TYPE} when $pl is defined
metze (This used to be commit 271d0af16d50bc89a384b56db70d569914273f6c)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm
index 05946b44f5..84f3091586 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm
@@ -2019,15 +2019,14 @@ sub AllocateArrayLevel($$$$$)
pidl "if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {";
pidl "\tNDR_PULL_ALLOC_N($ndr, $var, $size);";
pidl "}";
- } else {
- pidl "NDR_PULL_ALLOC_N($ndr, $var, $size);";
+ if (grep(/in/,@{$e->{DIRECTION}}) and
+ grep(/out/,@{$e->{DIRECTION}})) {
+ pidl "memcpy(r->out.$e->{NAME},r->in.$e->{NAME},$size * sizeof(*r->in.$e->{NAME}));";
+ }
+ return;
}
- if (grep(/in/,@{$e->{DIRECTION}}) and
- grep(/out/,@{$e->{DIRECTION}}) and
- $pl->{POINTER_TYPE} eq "ref") {
- pidl "memcpy(r->out.$e->{NAME},r->in.$e->{NAME},$size * sizeof(*r->in.$e->{NAME}));";
- }
+ pidl "NDR_PULL_ALLOC_N($ndr, $var, $size);";
}
#####################################################################