svn commit: samba r15778 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR: .
jelmer at samba.org
jelmer at samba.org
Sun May 21 15:01:48 GMT 2006
Author: jelmer
Date: 2006-05-21 15:01:47 +0000 (Sun, 21 May 2006)
New Revision: 15778
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15778
Log:
Fix bug printing ref pointers.
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2006-05-21 14:59:02 UTC (rev 15777)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2006-05-21 15:01:47 UTC (rev 15778)
@@ -702,13 +702,15 @@
foreach my $l (@{$e->{LEVELS}}) {
if ($l->{TYPE} eq "POINTER") {
+ if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
pidl "ndr_print_ptr(ndr, \"$e->{NAME}\", $var_name);";
pidl "ndr->depth++;";
- if ($l->{POINTER_TYPE} ne "ref") {
- pidl "if ($var_name) {";
- indent;
+ if ($l->{POINTER_TYPE} ne "ref") {
+ pidl "if ($var_name) {";
+ indent;
+ }
+ $var_name = get_value_of($var_name);
}
- $var_name = get_value_of($var_name);
} elsif ($l->{TYPE} eq "ARRAY") {
my $length;
@@ -757,11 +759,13 @@
foreach my $l (reverse @{$e->{LEVELS}}) {
if ($l->{TYPE} eq "POINTER") {
- if ($l->{POINTER_TYPE} ne "ref") {
- deindent;
- pidl "}";
+ if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
+ if ($l->{POINTER_TYPE} ne "ref") {
+ deindent;
+ pidl "}";
+ }
+ pidl "ndr->depth--;";
}
- pidl "ndr->depth--;";
} elsif (($l->{TYPE} eq "ARRAY")
and not is_charset_array($e,$l)
and not has_fast_array($e,$l)) {
More information about the samba-cvs
mailing list