From 5526a6e891d36c02d8e52a6fdb56c3da5b9e9cf5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Jan 2005 00:31:28 +0000 Subject: r4523: the PROPERTIES change for typedef was not quite as simple as I thought. This puts in a workaround that fixes things for now (This used to be commit 0939b83a0f07563edc6448fb6a87a573dbaa9f6c) --- source4/build/pidl/idl.pm | 14 +++++++------- source4/build/pidl/parser.pm | 12 ++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) (limited to 'source4/build') diff --git a/source4/build/pidl/idl.pm b/source4/build/pidl/idl.pm index 8a1bfd2b30..ed0192e3e9 100644 --- a/source4/build/pidl/idl.pm +++ b/source4/build/pidl/idl.pm @@ -1666,9 +1666,9 @@ sub #line 24 "build/pidl/idl.yp" {$_[3] => { "TYPE" => "COCLASS", - "PROPERTIES" => $_[1], - "NAME" => $_[3], - "DATA" => $_[5], + "PROPERTIES" => $_[1], + "NAME" => $_[3], + "DATA" => $_[5], }} ], [#Rule 5 @@ -1686,10 +1686,10 @@ sub #line 38 "build/pidl/idl.yp" {$_[3] => { "TYPE" => "INTERFACE", - "PROPERTIES" => $_[1], - "NAME" => $_[3], - "BASE" => $_[4], - "DATA" => $_[6], + "PROPERTIES" => $_[1], + "NAME" => $_[3], + "BASE" => $_[4], + "DATA" => $_[6], }} ], [#Rule 8 diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index 88d6cee0db..5a67f3d193 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -1259,6 +1259,10 @@ sub ParseTypedefPush($) return; } + if (defined($e->{PROPERTIES}) && !defined($e->{DATA}->{PROPERTIES})) { + $e->{DATA}->{PROPERTIES} = $e->{PROPERTIES}; + } + if ($e->{DATA}->{TYPE} eq "STRUCT") { pidl $static . "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, struct $e->{NAME} *r)"; pidl "\n{\n"; @@ -1292,6 +1296,10 @@ sub ParseTypedefPull($) my($e) = shift; my $static = fn_prefix($e); + if (defined($e->{PROPERTIES}) && !defined($e->{DATA}->{PROPERTIES})) { + $e->{DATA}->{PROPERTIES} = $e->{PROPERTIES}; + } + if (! needed::is_needed("pull_$e->{NAME}")) { # print "pull_$e->{NAME} not needed\n"; return; @@ -1329,6 +1337,10 @@ sub ParseTypedefPrint($) { my($e) = shift; + if (defined($e->{PROPERTIES}) && !defined($e->{DATA}->{PROPERTIES})) { + $e->{DATA}->{PROPERTIES} = $e->{PROPERTIES}; + } + if ($e->{DATA}->{TYPE} eq "STRUCT") { pidl "void ndr_print_$e->{NAME}(struct ndr_print *ndr, const char *name, struct $e->{NAME} *r)"; pidl "\n{\n"; -- cgit