From 67bc7ddbe9d42507f276381796f0be1ff01111d4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 12 Feb 2005 19:28:23 +0000 Subject: r5360: Remove a couple of unused functions. (This used to be commit d8a0a6972156c3211001b7f98e990c167be2468c) --- source4/build/pidl/ndr.pm | 2 +- source4/build/pidl/util.pm | 10 ---------- source4/librpc/ndr/libndr.h | 3 --- source4/librpc/ndr/ndr.c | 34 ---------------------------------- 4 files changed, 1 insertion(+), 48 deletions(-) (limited to 'source4') diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index 2bf7f4d205..149d5f93b9 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -551,7 +551,7 @@ sub ParseElementPrintScalar($$) if (util::is_fixed_array($e)) { ParseElementPrintBuffer($e, $var_prefix); - } elsif (util::has_direct_buffers($e)) { + } elsif ($e->{POINTERS} || util::array_size($e)) { pidl "\tndr_print_ptr(ndr, \"$e->{NAME}\", $var_prefix$e->{NAME});\n"; pidl "\tndr->depth++;\n"; ParseElementPrintBuffer($e, $var_prefix); diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm index f46fa76f0e..58d95eff39 100644 --- a/source4/build/pidl/util.pm +++ b/source4/build/pidl/util.pm @@ -306,16 +306,6 @@ sub array_size($) return undef; } -# determine if an element has a direct buffers component -sub has_direct_buffers($) -{ - my $e = shift; - if ($e->{POINTERS} || array_size($e)) { - return 1; - } - return 0; -} - # return 1 if the string is a C constant sub is_constant($) { diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 08bb5b3a36..4880df43bd 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -234,9 +234,6 @@ enum ndr_err_code { #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_fn_t)(struct ndr_push *, void *); -typedef NTSTATUS (*ndr_pull_fn_t)(struct ndr_pull *, void *); - 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_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *); diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 6e0300146a..52cc665e3a 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -469,22 +469,6 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr, handle subcontext buffers, which in midl land are user-marshalled, but we use magic in pidl to make them easier to cope with */ -NTSTATUS ndr_pull_subcontext_fn(struct ndr_pull *ndr, size_t sub_size, - void *base, ndr_pull_fn_t fn) -{ - struct ndr_pull *ndr2; - NDR_ALLOC(ndr, ndr2); - NDR_CHECK(ndr_pull_subcontext_header(ndr, sub_size, ndr2)); - NDR_CHECK(fn(ndr2, base)); - if (sub_size) { - NDR_CHECK(ndr_pull_advance(ndr, ndr2->data_size)); - } else { - NDR_CHECK(ndr_pull_advance(ndr, ndr2->offset)); - } - return NT_STATUS_OK; -} - - NTSTATUS ndr_pull_subcontext_flags_fn(struct ndr_pull *ndr, size_t sub_size, void *base, ndr_pull_flags_fn_t fn) { @@ -547,24 +531,6 @@ static NTSTATUS ndr_push_subcontext_header(struct ndr_push *ndr, handle subcontext buffers, which in midl land are user-marshalled, but we use magic in pidl to make them easier to cope with */ -NTSTATUS ndr_push_subcontext_fn(struct ndr_push *ndr, size_t sub_size, - void *base, ndr_push_fn_t fn) -{ - struct ndr_push *ndr2; - - ndr2 = ndr_push_init_ctx(ndr); - if (!ndr2) return NT_STATUS_NO_MEMORY; - - ndr2->flags = ndr->flags; - NDR_CHECK(fn(ndr2, base)); - NDR_CHECK(ndr_push_subcontext_header(ndr, sub_size, ndr2)); - NDR_CHECK(ndr_push_bytes(ndr, ndr2->data, ndr2->offset)); - return NT_STATUS_OK; -} - -/* - handle subcontext buffers for function that take a flags arg -*/ NTSTATUS ndr_push_subcontext_flags_fn(struct ndr_push *ndr, size_t sub_size, void *base, ndr_push_flags_fn_t fn) { -- cgit