summaryrefslogtreecommitdiffstats
path: root/source/librpc/ndr/ndr_spoolss_buf.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-06 17:02:14 +0000
committerJelmer Vernooij <jelmer@samba.org>2005-03-06 17:02:14 +0000
commiteba91247181f58b3ea1ba9e34ede74a3bb15eb0a (patch)
treea61b5730ac129f44db47b33bf7d54a1998ac0433 /source/librpc/ndr/ndr_spoolss_buf.c
parent607b0f73816caae6bfd8e4053f7172d7e786e869 (diff)
downloadsamba-eba91247181f58b3ea1ba9e34ede74a3bb15eb0a.tar.gz
samba-eba91247181f58b3ea1ba9e34ede74a3bb15eb0a.tar.xz
samba-eba91247181f58b3ea1ba9e34ede74a3bb15eb0a.zip
r5672: Use switch_type() and the token storage mechanism for unions:
- Makes union handling less special - Allows unions in arrays, etc - Compatible with midl - Pidl will warn about switch_type() and the type of the switch_is() variable being different
Diffstat (limited to 'source/librpc/ndr/ndr_spoolss_buf.c')
-rw-r--r--source/librpc/ndr/ndr_spoolss_buf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/librpc/ndr/ndr_spoolss_buf.c b/source/librpc/ndr/ndr_spoolss_buf.c
index e13e912b68f..4b1483709aa 100644
--- a/source/librpc/ndr/ndr_spoolss_buf.c
+++ b/source/librpc/ndr/ndr_spoolss_buf.c
@@ -39,7 +39,8 @@
for (i=0;i<r->out.count;i++) {\
ndr2->data += ndr2->offset;\
ndr2->offset = 0;\
- NDR_CHECK(ndr_push_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, r->in.level, &(*r->out.info)[i]));\
+ NDR_CHECK(ndr_push_set_switch_value(ndr2, &(*r->out.info)[i], r->in.level)); \
+ NDR_CHECK(ndr_push_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, &(*r->out.info)[i]));\
}\
if (*r->in.buf_size >= ndr2->offset) {\
buffer = data_blob_const(ndr2->data, ndr2->offset);\
@@ -94,7 +95,8 @@
for (i=0;i<r->out.count;i++) {\
ndr2->data += ndr2->offset;\
ndr2->offset = 0;\
- NDR_CHECK(ndr_pull_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, r->in.level, &(*r->out.info)[i]));\
+ NDR_CHECK(ndr_pull_set_switch_value(ndr2, &(*r->out.info)[i], r->in.level)); \
+ NDR_CHECK(ndr_pull_##type(ndr2, NDR_SCALARS|NDR_BUFFERS, &(*r->out.info)[i]));\
}\
}\
} while(0)