From a70196587f7213a6b25791b3faa6590674829ba1 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 4 Apr 2009 00:38:31 +0000 Subject: hubbub_alloc -> hubbub_allocator_fn svn path=/trunk/hubbub/; revision=7043 --- src/tokeniser/entities.c | 4 ++-- src/tokeniser/entities.h | 4 ++-- src/tokeniser/tokeniser.c | 5 +++-- src/tokeniser/tokeniser.h | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src/tokeniser') diff --git a/src/tokeniser/entities.c b/src/tokeniser/entities.c index 8bea1aa..b06ed28 100644 --- a/src/tokeniser/entities.c +++ b/src/tokeniser/entities.c @@ -2166,7 +2166,7 @@ static hubbub_dict *dict; * \param pw Pointer to client-specific private data (may be NULL) * \return HUBBUB_OK on success, appropriate error otherwise */ -hubbub_error hubbub_entities_create(hubbub_alloc alloc, void *pw) +hubbub_error hubbub_entities_create(hubbub_allocator_fn alloc, void *pw) { hubbub_error error; size_t i; @@ -2196,7 +2196,7 @@ hubbub_error hubbub_entities_create(hubbub_alloc alloc, void *pw) * \param alloc Memory (de)allocation function * \param pw Pointer to client-specific private data (may be NULL) */ -void hubbub_entities_destroy(hubbub_alloc alloc, void *pw) +void hubbub_entities_destroy(hubbub_allocator_fn alloc, void *pw) { UNUSED(alloc); UNUSED(pw); diff --git a/src/tokeniser/entities.h b/src/tokeniser/entities.h index efd1987..1cc091a 100644 --- a/src/tokeniser/entities.h +++ b/src/tokeniser/entities.h @@ -14,9 +14,9 @@ #include /* Create the entities dictionary */ -hubbub_error hubbub_entities_create(hubbub_alloc alloc, void *pw); +hubbub_error hubbub_entities_create(hubbub_allocator_fn alloc, void *pw); /* Destroy the entities dictionary */ -void hubbub_entities_destroy(hubbub_alloc alloc, void *pw); +void hubbub_entities_destroy(hubbub_allocator_fn alloc, void *pw); /* Step-wise search for an entity in the dictionary */ hubbub_error hubbub_entities_search_step(uint8_t c, uint32_t *result, diff --git a/src/tokeniser/tokeniser.c b/src/tokeniser/tokeniser.c index 3b2fa9e..5ef6ef8 100644 --- a/src/tokeniser/tokeniser.c +++ b/src/tokeniser/tokeniser.c @@ -178,7 +178,7 @@ struct hubbub_tokeniser { hubbub_error_handler error_handler; /**< Error handling callback */ void *error_pw; /**< Error handler data */ - hubbub_alloc alloc; /**< Memory (de)allocation function */ + hubbub_allocator_fn alloc; /**< Memory (de)allocation function */ void *alloc_pw; /**< Client private data */ }; @@ -284,7 +284,8 @@ static hubbub_error hubbub_tokeniser_emit_token(hubbub_tokeniser *tokeniser, * HUBBUB_NOMEM on memory exhaustion */ hubbub_error hubbub_tokeniser_create(parserutils_inputstream *input, - hubbub_alloc alloc, void *pw, hubbub_tokeniser **tokeniser) + hubbub_allocator_fn alloc, void *pw, + hubbub_tokeniser **tokeniser) { parserutils_error perror; hubbub_tokeniser *tok; diff --git a/src/tokeniser/tokeniser.h b/src/tokeniser/tokeniser.h index 0ccb7d1..4a9f362 100644 --- a/src/tokeniser/tokeniser.h +++ b/src/tokeniser/tokeniser.h @@ -52,7 +52,8 @@ typedef union hubbub_tokeniser_optparams { /* Create a hubbub tokeniser */ hubbub_error hubbub_tokeniser_create(parserutils_inputstream *input, - hubbub_alloc alloc, void *pw, hubbub_tokeniser **tokeniser); + hubbub_allocator_fn alloc, void *pw, + hubbub_tokeniser **tokeniser); /* Destroy a hubbub tokeniser */ hubbub_error hubbub_tokeniser_destroy(hubbub_tokeniser *tokeniser); -- cgit v1.2.3