summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-21 06:44:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:01 -0500
commit84b5890a960a74462ca593fcc4d113e96a77a051 (patch)
tree3e944094f91201a3c307a1da20096f2f4318d8fc /source4/build/pidl
parent0a05bdb9eb096e4426d06b8663ad295f6a693af2 (diff)
downloadsamba-84b5890a960a74462ca593fcc4d113e96a77a051.tar.gz
samba-84b5890a960a74462ca593fcc4d113e96a77a051.tar.bz2
samba-84b5890a960a74462ca593fcc4d113e96a77a051.zip
r4883: support ndr_size_ generation on unions as well as structures
(This used to be commit 852ad354b481f130f80213f2924ad44d10340b21)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/header.pm7
1 files changed, 6 insertions, 1 deletions
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")) {