From 152a6a00c31f52d14a63bfc977ac54713c56c9cd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 24 Jun 2005 01:18:56 +0000 Subject: r7865: changed pidl to take a "const void *" instead of a "void *" for the structure in ndr_push_*() and ndr_print_*(). The push and print functions really should not modify the structure. metze, to make this work I had to change your spoolss hand marshaller. Can you please check it is OK? I think that the IN and OUT sides of that function are not ever called on the same structure, so I think that attempt at remembering the value by assigning to r->in._offered was not doing anything anyway, but please correct me if I have misunderstood it. If you really do need to remember something on those structures I'd suggest the ndr_token_store() and ndr_token_retrieve() functions, which are used by pidl for just this sort of thing. (This used to be commit eee528be97fa43ca53bdc5652b4d29a0a2caf563) --- source4/librpc/ndr/libndr.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/librpc/ndr/libndr.h') diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 93cc67eaad..17c06b79da 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -247,9 +247,8 @@ enum ndr_compression_alg { #define NDR_PUSH_ALLOC(ndr, s) NDR_PUSH_ALLOC_SIZE(ndr, s, sizeof(*(s))) /* these are used when generic fn pointers are needed for ndr push/pull fns */ -typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, void *); -typedef NTSTATUS (*ndr_push_const_fn_t)(struct ndr_push *, int ndr_flags, const void *); +typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, const void *); typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *); -typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, void *); -typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, void *); +typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, const void *); +typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, const void *); -- cgit