1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r11974: only look at $pl->{POINTER_TYPE} when $pl is defined

metze
This commit is contained in:
Stefan Metzmacher 2005-11-30 17:07:02 +00:00 committed by Gerald (Jerry) Carter
parent 247f90c28d
commit 271d0af16d

View File

@ -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);";
}
#####################################################################