summaryrefslogtreecommitdiff
path: root/src/tokeniser
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-04-04 00:38:31 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-04-04 00:38:31 +0000
commita70196587f7213a6b25791b3faa6590674829ba1 (patch)
treef42b494d684b364f6c7a3ee6b853400625ba6014 /src/tokeniser
parenta3afa7e6b09d01d1a7b6a8ab0b94217e392f7cb9 (diff)
downloadlibhubbub-a70196587f7213a6b25791b3faa6590674829ba1.tar.gz
libhubbub-a70196587f7213a6b25791b3faa6590674829ba1.tar.bz2
hubbub_alloc -> hubbub_allocator_fn
svn path=/trunk/hubbub/; revision=7043
Diffstat (limited to 'src/tokeniser')
-rw-r--r--src/tokeniser/entities.c4
-rw-r--r--src/tokeniser/entities.h4
-rw-r--r--src/tokeniser/tokeniser.c5
-rw-r--r--src/tokeniser/tokeniser.h3
4 files changed, 9 insertions, 7 deletions
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 <hubbub/functypes.h>
/* 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);