diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-05 16:50:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:56 -0500 |
commit | df036e08294ec98a2c7049f7f2fe03de1fd2ae44 (patch) | |
tree | e57c62d6f2d2d75daff4c059a0407569d8ec3f1c /source4/build/pidl/ndr.pm | |
parent | 75d2452c019835faccdeb44908e158da0b8fa75a (diff) | |
download | samba-df036e08294ec98a2c7049f7f2fe03de1fd2ae44.tar.gz samba-df036e08294ec98a2c7049f7f2fe03de1fd2ae44.tar.bz2 samba-df036e08294ec98a2c7049f7f2fe03de1fd2ae44.zip |
r5660: Reduce number of generated "{}"'s
No longer complain about pointers to arrays - we support those.
(This used to be commit 128c0ecf030043e81d73aaeda6afb731075f8f9e)
Diffstat (limited to 'source4/build/pidl/ndr.pm')
-rw-r--r-- | source4/build/pidl/ndr.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index c460c92c95..8a654f7165 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -1820,15 +1820,18 @@ sub ParseFunctionElementPull($$) pidl "NDR_CHECK(ndr_pull_unique_ptr(ndr, &_ptr_$e->{NAME}));"; pidl "r->$inout.$e->{NAME} = NULL;"; pidl "if (_ptr_$e->{NAME}) {"; + indent; } elsif ($inout eq "out" && util::has_property($e, "ref")) { pidl "if (r->$inout.$e->{NAME}) {"; - } else { - pidl "{"; + indent; } - indent; + ParseArrayPull($e, "ndr", "r->$inout.", "NDR_SCALARS|NDR_BUFFERS"); - deindent; - pidl "}"; + + if (need_wire_pointer($e) or ($inout eq "out" and util::has_property($e, "ref"))) { + deindent; + pidl "}"; + } } else { if ($inout eq "out" && util::has_property($e, "ref")) { pidl "if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {"; |