summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2010-12-04 23:12:24 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2010-12-04 23:12:24 +0000
commit64e9feb8d0e62a4428d1db7a18cf00fdc2917252 (patch)
tree20fde4d3d12c66ee9520cdb2f7ed6a76fb1ca48f /bindings
parenta52bcd7b8a077fc39cc75b12a63e49397d5e891f (diff)
downloadlibdom-64e9feb8d0e62a4428d1db7a18cf00fdc2917252.tar.gz
libdom-64e9feb8d0e62a4428d1db7a18cf00fdc2917252.tar.bz2
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
Diffstat (limited to 'bindings')
-rw-r--r--bindings/hubbub/parser.c18
-rw-r--r--bindings/hubbub/parser.h2
2 files changed, 2 insertions, 18 deletions
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);