From 8e48b931091cbc99abeffacc7af80f363495ec23 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 14 Dec 2013 23:14:09 +0000 Subject: Remove client allocation function. --- include/parserutils/charset/codec.h | 1 - include/parserutils/functypes.h | 3 --- include/parserutils/input/inputstream.h | 1 - include/parserutils/utils/buffer.h | 6 +----- include/parserutils/utils/stack.h | 2 +- include/parserutils/utils/vector.h | 3 +-- 6 files changed, 3 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/parserutils/charset/codec.h b/include/parserutils/charset/codec.h index 96934a6..0365643 100644 --- a/include/parserutils/charset/codec.h +++ b/include/parserutils/charset/codec.h @@ -90,7 +90,6 @@ typedef union parserutils_charset_codec_optparams { /* Create a charset codec */ parserutils_error parserutils_charset_codec_create(const char *charset, - parserutils_alloc alloc, void *pw, parserutils_charset_codec **codec); /* Destroy a charset codec */ parserutils_error parserutils_charset_codec_destroy( diff --git a/include/parserutils/functypes.h b/include/parserutils/functypes.h index 7ff626d..174bca2 100644 --- a/include/parserutils/functypes.h +++ b/include/parserutils/functypes.h @@ -19,9 +19,6 @@ extern "C" #include -/* Type of allocation function for parserutils */ -typedef void *(*parserutils_alloc)(void *ptr, size_t size, void *pw); - #ifdef __cplusplus } #endif diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h index 1fd95e9..eb33307 100644 --- a/include/parserutils/input/inputstream.h +++ b/include/parserutils/input/inputstream.h @@ -48,7 +48,6 @@ typedef struct parserutils_inputstream /* Create an input stream */ parserutils_error parserutils_inputstream_create(const char *enc, uint32_t encsrc, parserutils_charset_detect_func csdetect, - parserutils_alloc alloc, void *pw, parserutils_inputstream **stream); /* Destroy an input stream */ parserutils_error parserutils_inputstream_destroy( diff --git a/include/parserutils/utils/buffer.h b/include/parserutils/utils/buffer.h index cf3cb02..9425070 100644 --- a/include/parserutils/utils/buffer.h +++ b/include/parserutils/utils/buffer.h @@ -21,14 +21,10 @@ struct parserutils_buffer uint8_t *data; size_t length; size_t allocated; - - parserutils_alloc alloc; - void *pw; }; typedef struct parserutils_buffer parserutils_buffer; -parserutils_error parserutils_buffer_create(parserutils_alloc alloc, - void *pw, parserutils_buffer **buffer); +parserutils_error parserutils_buffer_create(parserutils_buffer **buffer); parserutils_error parserutils_buffer_destroy(parserutils_buffer *buffer); parserutils_error parserutils_buffer_append(parserutils_buffer *buffer, diff --git a/include/parserutils/utils/stack.h b/include/parserutils/utils/stack.h index 5bfe412..60f2d71 100644 --- a/include/parserutils/utils/stack.h +++ b/include/parserutils/utils/stack.h @@ -22,7 +22,7 @@ struct parserutils_stack; typedef struct parserutils_stack parserutils_stack; parserutils_error parserutils_stack_create(size_t item_size, size_t chunk_size, - parserutils_alloc alloc, void *pw, parserutils_stack **stack); + parserutils_stack **stack); parserutils_error parserutils_stack_destroy(parserutils_stack *stack); parserutils_error parserutils_stack_push(parserutils_stack *stack, diff --git a/include/parserutils/utils/vector.h b/include/parserutils/utils/vector.h index ca4f06a..f01f00e 100644 --- a/include/parserutils/utils/vector.h +++ b/include/parserutils/utils/vector.h @@ -22,8 +22,7 @@ struct parserutils_vector; typedef struct parserutils_vector parserutils_vector; parserutils_error parserutils_vector_create(size_t item_size, - size_t chunk_size, parserutils_alloc alloc, void *pw, - parserutils_vector **vector); + size_t chunk_size, parserutils_vector **vector); parserutils_error parserutils_vector_destroy(parserutils_vector *vector); parserutils_error parserutils_vector_append(parserutils_vector *vector, -- cgit v1.2.1