r26054: ndr: remove ndr_push/pull_save
authorStefan Metzmacher <metze@samba.org>
Tue, 20 Nov 2007 10:08:33 +0000 (11:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:45:49 +0000 (05:45 +0100)
Using a uint32_t offset is all we need

metze
(This used to be commit 2c06b48a858016f9329dcd73231fb3c7b711a918)

source4/librpc/ndr/libndr.h
source4/librpc/ndr/ndr.c
source4/librpc/ndr/ndr_basic.c

index 2ef66882cfd1f711070caa019743b23c715d761d..2ac0b86f57d7fca657a5a1eb7f5b8b67f4f0a829 100644 (file)
@@ -67,12 +67,6 @@ struct ndr_pull {
        uint32_t ptr_count;
 };
 
-struct ndr_pull_save {
-       uint32_t data_size;
-       uint32_t offset;
-       struct ndr_pull_save *next;
-};
-
 /* structure passed to functions that generate NDR formatted data */
 struct ndr_push {
        uint32_t flags; /* LIBNDR_FLAG_* */
@@ -92,12 +86,6 @@ struct ndr_push {
        uint32_t ptr_count;
 };
 
-struct ndr_push_save {
-       uint32_t offset;
-       struct ndr_push_save *next;
-};
-
-
 /* structure passed to functions that print IDL structures */
 struct ndr_print {
        uint32_t flags; /* LIBNDR_FLAG_* */
index c51e77cde55f8403ac0bbea41eb0a996534291d9..40afeacebfcdbd4c38fb454790952a4af41e3715 100644 (file)
@@ -98,21 +98,6 @@ static enum ndr_err_code ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs)
        return NDR_ERR_SUCCESS;
 }
 
-/* save the offset/size of the current ndr state */
-_PUBLIC_ void ndr_pull_save(struct ndr_pull *ndr, struct ndr_pull_save *save)
-{
-       save->offset = ndr->offset;
-       save->data_size = ndr->data_size;
-}
-
-/* restore the size/offset of a ndr structure */
-_PUBLIC_ void ndr_pull_restore(struct ndr_pull *ndr, struct ndr_pull_save *save)
-{
-       ndr->offset = save->offset;
-       ndr->data_size = save->data_size;
-}
-
-
 /* create a ndr_push structure, ready for some marshalling */
 _PUBLIC_ struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
 {
index 0ef78a2a5497e2e2be759f6b5e1c74e9dd66d705..93a177f94e5f127698e14652cbbe2a02edd53fbd 100644 (file)
@@ -446,22 +446,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_array_uint8(struct ndr_push *ndr, int ndr_fl
        return ndr_push_bytes(ndr, data, n);
 }
 
-/*
-  save the current position
- */
-_PUBLIC_ void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save)
-{
-       save->offset = ndr->offset;
-}
-
-/*
-  restore the position
- */
-_PUBLIC_ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save)
-{
-       ndr->offset = save->offset;
-}
-
 /*
   push a unique non-zero value if a pointer is non-NULL, otherwise 0
 */