Author: metze Date: 2007-11-20 11:08:33 +0000 (Tue, 20 Nov 2007) New Revision: 26054
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26054 Log: ndr: remove ndr_push/pull_save Using a uint32_t offset is all we need metze Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h branches/SAMBA_4_0/source/librpc/ndr/ndr.c branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h =================================================================== --- branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2007-11-20 11:08:24 UTC (rev 26053) +++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2007-11-20 11:08:33 UTC (rev 26054) @@ -67,12 +67,6 @@ 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 @@ 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_* */ Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c =================================================================== --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-20 11:08:24 UTC (rev 26053) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2007-11-20 11:08:33 UTC (rev 26054) @@ -98,21 +98,6 @@ 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) { Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c =================================================================== --- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c 2007-11-20 11:08:24 UTC (rev 26053) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c 2007-11-20 11:08:33 UTC (rev 26054) @@ -447,22 +447,6 @@ } /* - 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 */ _PUBLIC_ enum ndr_err_code ndr_push_unique_ptr(struct ndr_push *ndr, const void *p)
