svn commit: samba r5660 - in branches/SAMBA_4_0/source/build/pidl: .
jelmer at samba.org
jelmer at samba.org
Sat Mar 5 16:50:02 GMT 2005
Author: jelmer
Date: 2005-03-05 16:50:02 +0000 (Sat, 05 Mar 2005)
New Revision: 5660
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5660
Log:
Reduce number of generated "{}"'s
No longer complain about pointers to arrays - we support those.
Modified:
branches/SAMBA_4_0/source/build/pidl/ndr.pm
branches/SAMBA_4_0/source/build/pidl/validator.pm
Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/ndr.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/ndr.pm 2005-03-05 09:46:34 UTC (rev 5659)
+++ branches/SAMBA_4_0/source/build/pidl/ndr.pm 2005-03-05 16:50:02 UTC (rev 5660)
@@ -1820,15 +1820,18 @@
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) {";
Modified: branches/SAMBA_4_0/source/build/pidl/validator.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/validator.pm 2005-03-05 09:46:34 UTC (rev 5659)
+++ branches/SAMBA_4_0/source/build/pidl/validator.pm 2005-03-05 16:50:02 UTC (rev 5660)
@@ -40,9 +40,6 @@
sub ValidElement($)
{
my $e = shift;
- if ($e->{POINTERS} && $e->{ARRAY_LEN}) {
- fatal(el_name($e) . " : pidl cannot handle pointers to arrays. Use a substructure instead\n");
- }
if (util::has_property($e, "ptr")) {
fatal(el_name($e) . " : pidl does not support full NDR pointers yet\n");
More information about the samba-cvs
mailing list