char *prs_alloc_mem(prs_struct *ps, size_t size, unsigned int count);
TALLOC_CTX *prs_get_mem_context(prs_struct *ps);
void prs_give_memory(prs_struct *ps, char *buf, uint32 size, bool is_dynamic);
-char *prs_take_memory(prs_struct *ps, uint32 *psize);
bool prs_set_buffer_size(prs_struct *ps, uint32 newsize);
bool prs_grow(prs_struct *ps, uint32 extra_space);
bool prs_force_grow(prs_struct *ps, uint32 extra_space);
ps->buffer_size = size;
}
-/*******************************************************************
- Take some memory back from a prs_struct.
- ********************************************************************/
-
-char *prs_take_memory(prs_struct *ps, uint32 *psize)
-{
- char *ret = ps->data_p;
- if(psize)
- *psize = ps->buffer_size;
- ps->is_dynamic = False;
- prs_mem_free(ps);
- return ret;
-}
-
/*******************************************************************
Set a prs_struct to exactly a given size. Will grow or tuncate if neccessary.
********************************************************************/