summaryrefslogtreecommitdiff
path: root/examples/libxml.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-12-14 23:15:34 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-12-14 23:15:34 +0000
commit528795a5daf767532a42b492db29deeadebcb249 (patch)
tree06b6fba37d2a740341139131cfbd47eb0b59ab7f /examples/libxml.c
parentd509919a3bc507f3898e2166978462badbaab599 (diff)
downloadlibhubbub-528795a5daf767532a42b492db29deeadebcb249.tar.gz
libhubbub-528795a5daf767532a42b492db29deeadebcb249.tar.bz2
Remove client allocation function and update for new lpu API.
Diffstat (limited to 'examples/libxml.c')
-rw-r--r--examples/libxml.c22
1 files changed, 1 insertions, 21 deletions
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)