From 528795a5daf767532a42b492db29deeadebcb249 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 14 Dec 2013 23:15:34 +0000 Subject: Remove client allocation function and update for new lpu API. --- examples/libxml.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'examples/libxml.c') diff --git a/examples/libxml.c b/examples/libxml.c index e970e4c..9530ca3 100644 --- a/examples/libxml.c +++ b/examples/libxml.c @@ -127,25 +127,6 @@ static hubbub_tree_handler tree_handler = { NULL }; -/** - * Memory allocation callback. - * - * \param ptr Pointer to block to reallocate, or NULL for a new allocation - * \param len Required length, in bytes. If zero, then free the block - * \param pw Pointer to our private data - * \return Pointer to resized block - */ -static void *myrealloc(void *ptr, size_t len, void *pw) -{ - /* In this implementation, we just call realloc. - * If we have more complex allocation requirements (e.g. multiple - * allocation arenas, then we could use pw to point to the arena to use) - */ - UNUSED(pw); - - return realloc(ptr, len); -} - /****************************************************************************** * Main hubbub driver code * ******************************************************************************/ @@ -295,8 +276,7 @@ error_code create_context(const char *charset, context **ctx) c->document = NULL; /* Create the parser */ - error = hubbub_parser_create(c->encoding, true, myrealloc, NULL, - &c->parser); + error = hubbub_parser_create(c->encoding, true, &c->parser); if (error != HUBBUB_OK) { free(c); if (error == HUBBUB_BADENCODING) -- cgit v1.2.3