summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-07-19 19:00:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:44 -0500
commitd99d06d954321331f8558da8604e1fd4dd956d13 (patch)
tree052e242ee7d61e658d6ec78b216587143f06565d /source4/librpc
parent8f16aa6c179a6157a4fbece3b30ef6ebfb3f5562 (diff)
downloadsamba-d99d06d954321331f8558da8604e1fd4dd956d13.tar.gz
samba-d99d06d954321331f8558da8604e1fd4dd956d13.tar.bz2
samba-d99d06d954321331f8558da8604e1fd4dd956d13.zip
r8612: Parse::Pidl::NDR:
Values that are deferred but don't contain deferred data don't need NDR_BUFFERS Parse::Pidl::Samba::NDR::Parser: Only use manually written array access functions when the array functions are faster then the autogenerated ones. Makes ndr_basic.c a bit shorter. (This used to be commit cad40815dcfb7cdcab13bd0cd204ef8711605ef3)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/ndr/ndr_basic.c192
1 files changed, 0 insertions, 192 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 5046b860a3..efff2dbc5f 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -263,66 +263,6 @@ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, uint8_t *data
}
/*
- pull an array of uint16
-*/
-NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16_t *data, uint32_t n)
-{
- uint32_t i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
- pull a const array of uint32_t
-*/
-NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *data, uint32_t n)
-{
- uint32_t i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
- pull a const array of hyper
-*/
-NTSTATUS ndr_pull_array_hyper(struct ndr_pull *ndr, int ndr_flags, uint64_t *data, uint32_t n)
-{
- uint32_t i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
- pull a const array of WERROR
-*/
-NTSTATUS ndr_pull_array_WERROR(struct ndr_pull *ndr, int ndr_flags, WERROR *data, uint32_t n)
-{
- uint32_t i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
push a int8_t
*/
NTSTATUS ndr_push_int8(struct ndr_push *ndr, int ndr_flags, int8_t v)
@@ -481,66 +421,6 @@ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const uint8_t
}
/*
- push an array of uint16
-*/
-NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16_t *data, uint32_t n)
-{
- int i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
- push an array of uint32_t
-*/
-NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32_t *data, uint32_t n)
-{
- int i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
- push an array of hyper
-*/
-NTSTATUS ndr_push_array_hyper(struct ndr_push *ndr, int ndr_flags, const uint64_t *data, uint32_t n)
-{
- int i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
- push an array of hyper
-*/
-NTSTATUS ndr_push_array_WERROR(struct ndr_push *ndr, int ndr_flags, const WERROR *data, uint32_t n)
-{
- int i;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
- }
- for (i=0;i<n;i++) {
- NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, data[i]));
- }
- return NT_STATUS_OK;
-}
-
-/*
save the current position
*/
void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save)
@@ -837,78 +717,6 @@ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level
ndr->print(ndr, "UNKNOWN LEVEL %u", level);
}
-void ndr_print_array_WERROR(struct ndr_print *ndr, const char *name,
- const WERROR *data, uint32_t count)
-{
- int i;
-
- ndr->print(ndr, "%s: ARRAY(%d)", name, count);
- ndr->depth++;
- for (i=0;i<count;i++) {
- char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_WERROR(ndr, idx, data[i]);
- free(idx);
- }
- }
- ndr->depth--;
-}
-
-void ndr_print_array_hyper(struct ndr_print *ndr, const char *name,
- const uint64_t *data, uint32_t count)
-{
- int i;
-
- ndr->print(ndr, "%s: ARRAY(%d)", name, count);
- ndr->depth++;
- for (i=0;i<count;i++) {
- char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_hyper(ndr, idx, data[i]);
- free(idx);
- }
- }
- ndr->depth--;
-}
-
-void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
- const uint32_t *data, uint32_t count)
-{
- int i;
-
- ndr->print(ndr, "%s: ARRAY(%d)", name, count);
- ndr->depth++;
- for (i=0;i<count;i++) {
- char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_uint32(ndr, idx, data[i]);
- free(idx);
- }
- }
- ndr->depth--;
-}
-
-void ndr_print_array_uint16(struct ndr_print *ndr, const char *name,
- const uint16_t *data, uint32_t count)
-{
- int i;
-
- ndr->print(ndr, "%s: ARRAY(%d)", name, count);
- ndr->depth++;
- for (i=0;i<count;i++) {
- char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- ndr_print_uint16(ndr, idx, data[i]);
- free(idx);
- }
- }
- ndr->depth--;
-}
-
void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
const uint8_t *data, uint32_t count)
{