From 84b5890a960a74462ca593fcc4d113e96a77a051 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 06:44:52 +0000 Subject: r4883: support ndr_size_ generation on unions as well as structures (This used to be commit 852ad354b481f130f80213f2924ad44d10340b21) --- source4/build/pidl/header.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/build/pidl') diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm index 9f16c2655f..51983460ed 100644 --- a/source4/build/pidl/header.pm +++ b/source4/build/pidl/header.pm @@ -228,7 +228,12 @@ sub HeaderTypedefProto($) my($d) = shift; if (needed::is_needed("ndr_size_$d->{NAME}")) { - $res .= "size_t ndr_size_$d->{NAME}(const struct $d->{NAME} *r, int flags);\n"; + if ($d->{DATA}{TYPE} eq "STRUCT") { + $res .= "size_t ndr_size_$d->{NAME}(const struct $d->{NAME} *r, int flags);\n"; + } + if ($d->{DATA}{TYPE} eq "UNION") { + $res .= "size_t ndr_size_$d->{NAME}(const union $d->{NAME} *r, uint32_t level, int flags);\n"; + } } if (!util::has_property($d, "public")) { -- cgit