From 64e9feb8d0e62a4428d1db7a18cf00fdc2917252 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 4 Dec 2010 23:12:24 +0000 Subject: Make libdom work again given lack of init/finalise in hubbub and prepare initial attempt at importing tests into the makefile svn path=/trunk/dom/; revision=10992 --- bindings/hubbub/parser.c | 18 +----------------- bindings/hubbub/parser.h | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'bindings') diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c index b567978..c7fc608 100644 --- a/bindings/hubbub/parser.c +++ b/bindings/hubbub/parser.c @@ -99,12 +99,9 @@ static hubbub_tree_handler tree_handler = { NULL }; -static bool __initialised = false; - /** * Create a Hubbub parser instance * - * \param aliases Path to encoding alias mapping file * \param enc Source charset, or NULL * \param fix_enc Whether fix the encoding * \param alloc Memory (de)allocation function @@ -113,7 +110,7 @@ static bool __initialised = false; * \param mctx Pointer to client-specific private data * \return Pointer to instance, or NULL on memory exhaustion */ -dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases, +dom_hubbub_parser *dom_hubbub_parser_create( const char *enc, bool fix_enc, dom_alloc alloc, void *pw, dom_msg msg, void *mctx) { @@ -123,19 +120,6 @@ dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases, dom_exception err; struct dom_string *features; - if (__initialised == false) { - error = hubbub_initialise(aliases, - (hubbub_allocator_fn) alloc, pw); - if (error != HUBBUB_OK) { - msg(DOM_MSG_ERROR, mctx, - "Failed initialising hubbub"); - return NULL; - } - - __initialised = true; - } - - parser = alloc(NULL, sizeof(dom_hubbub_parser), pw); if (parser == NULL) { msg(DOM_MSG_CRITICAL, mctx, "No memory for parsing context"); diff --git a/bindings/hubbub/parser.h b/bindings/hubbub/parser.h index 350f3d6..0d9f953 100644 --- a/bindings/hubbub/parser.h +++ b/bindings/hubbub/parser.h @@ -48,7 +48,7 @@ typedef enum dom_hubub_encoding_source { */ /* Create a Hubbub parser instance */ -dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases, +dom_hubbub_parser *dom_hubbub_parser_create( const char *enc, bool fix_enc, dom_alloc alloc, void *pw, dom_msg msg, void *mctx); -- cgit v1.2.3