diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-06 17:02:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:58 -0500 |
commit | ffae01d432c715961c44e499258ee2a9f7e3d5f1 (patch) | |
tree | 46ba7f1e6fdfca93581c9426c0ab68068b1d1963 /source4/librpc/ndr/ndr_spoolss_buf.c | |
parent | 5658167806a6fbe70288a22b0304a3cfd773c44f (diff) | |
download | samba-ffae01d432c715961c44e499258ee2a9f7e3d5f1.tar.gz samba-ffae01d432c715961c44e499258ee2a9f7e3d5f1.tar.bz2 samba-ffae01d432c715961c44e499258ee2a9f7e3d5f1.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
(This used to be commit dc6b4ffc82a191631bc16a4b93a4916a39183ec6)
Diffstat (limited to 'source4/librpc/ndr/ndr_spoolss_buf.c')
-rw-r--r-- | source4/librpc/ndr/ndr_spoolss_buf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c index e13e912b68..4b1483709a 100644 --- a/source4/librpc/ndr/ndr_spoolss_buf.c +++ b/source4/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) |