summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-08-26 23:00:23 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-08-26 23:00:23 +0000
commit229af12d7ab2c071a6888eb8ffc49bb0bbeb9ddd (patch)
tree78100a859a1bf8fbb9d2166dd0843c49c98c53c3 /bindings
parent5c109b370a014e49387320fa23bb589e4d4e36f1 (diff)
downloadlibdom-229af12d7ab2c071a6888eb8ffc49bb0bbeb9ddd.tar.gz
libdom-229af12d7ab2c071a6888eb8ffc49bb0bbeb9ddd.tar.bz2
Sync with modified libwapcaplet API: 11 additional DOM Level1 testsuite failures. Most importantly, it actually compiles now.
svn path=/trunk/dom/; revision=10717
Diffstat (limited to 'bindings')
-rw-r--r--bindings/hubbub/parser.c14
-rw-r--r--bindings/hubbub/parser.h4
-rw-r--r--bindings/xml/xmlparser.c15
-rw-r--r--bindings/xml/xmlparser.h4
4 files changed, 12 insertions, 25 deletions
diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c
index a19647b..b567978 100644
--- a/bindings/hubbub/parser.c
+++ b/bindings/hubbub/parser.c
@@ -45,8 +45,6 @@ struct dom_hubbub_parser {
dom_msg msg; /**< Informational messaging function */
void *mctx; /**< Pointer to client data */
-
- struct lwc_context_s *ctx; /**< The string intern context */
};
@@ -117,8 +115,7 @@ static bool __initialised = false;
*/
dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases,
const char *enc, bool fix_enc,
- dom_alloc alloc, void *pw, dom_msg msg, void *mctx,
- lwc_context *ctx)
+ dom_alloc alloc, void *pw, dom_msg msg, void *mctx)
{
dom_hubbub_parser *parser;
hubbub_parser_optparams params;
@@ -157,7 +154,6 @@ dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases,
parser->pw = pw;
parser->msg = msg;
parser->mctx = mctx;
- parser->ctx = ctx;
error = hubbub_parser_create(enc, fix_enc, alloc, pw, &parser->parser);
if (error != HUBBUB_OK) {
@@ -194,7 +190,7 @@ dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases,
* we should pass the real function when we integrate libDOM with
* Netsurf */
err = dom_implementation_create_document(parser->impl, NULL, NULL, NULL,
- alloc, pw, ctx, NULL, &parser->doc);
+ alloc, pw, NULL, &parser->doc);
if (err != DOM_NO_ERR) {
hubbub_parser_destroy(parser->parser);
alloc(parser, 0, pw);
@@ -280,12 +276,12 @@ dom_hubbub_error dom_hubbub_parser_completed(dom_hubbub_parser *parser)
parser->complete = true;
- lerr = lwc_context_intern(parser->ctx, "id", strlen("id"), &name);
+ lerr = lwc_intern_string("id", strlen("id"), &name);
if (lerr != lwc_error_ok)
return HUBBUB_UNKNOWN;
_dom_document_set_id_name(parser->doc, name);
- lwc_context_string_unref(parser->ctx, name);
+ lwc_string_unref(name);
return DOM_HUBBUB_OK;
}
@@ -408,7 +404,7 @@ static hubbub_error create_doctype(void *parser, const hubbub_doctype *doctype,
err = dom_implementation_create_document_type(dom_parser->impl, qname,
public_id, system_id, dom_parser->alloc,
- dom_parser->pw, dom_parser->ctx, &dtype);
+ dom_parser->pw, &dtype);
if (err != DOM_NO_ERR) {
dom_parser->msg(DOM_MSG_CRITICAL, dom_parser->mctx,
"Can't create the document type");
diff --git a/bindings/hubbub/parser.h b/bindings/hubbub/parser.h
index 8b2218d..350f3d6 100644
--- a/bindings/hubbub/parser.h
+++ b/bindings/hubbub/parser.h
@@ -16,7 +16,6 @@
#include "errors.h"
struct dom_document;
-struct lwc_context_s;
typedef struct dom_hubbub_parser dom_hubbub_parser;
@@ -51,8 +50,7 @@ typedef enum dom_hubub_encoding_source {
/* Create a Hubbub parser instance */
dom_hubbub_parser *dom_hubbub_parser_create(const char *aliases,
const char *enc, bool fix_enc,
- dom_alloc alloc, void *pw, dom_msg msg, void *mctx,
- struct lwc_context_s *ctx);
+ dom_alloc alloc, void *pw, dom_msg msg, void *mctx);
/* Destroy a Hubbub parser instance */
void dom_hubbub_parser_destroy(dom_hubbub_parser *parser);
diff --git a/bindings/xml/xmlparser.c b/bindings/xml/xmlparser.c
index 8cae01c..8e1013f 100644
--- a/bindings/xml/xmlparser.c
+++ b/bindings/xml/xmlparser.c
@@ -104,8 +104,6 @@ struct dom_xml_parser {
dom_msg msg; /**< Informational message function */
void *mctx; /**< Pointer to client data */
-
- struct lwc_context_s *ctx; /**< The lwc_context of the parser */
};
/**
@@ -162,8 +160,7 @@ static xmlSAXHandler sax_handler = {
* parser encoding is not yet implemented
*/
dom_xml_parser *dom_xml_parser_create(const char *enc, const char *int_enc,
- dom_alloc alloc, void *pw, dom_msg msg, void *mctx,
- lwc_context *ctx)
+ dom_alloc alloc, void *pw, dom_msg msg, void *mctx)
{
dom_xml_parser *parser;
struct dom_string *features;
@@ -239,8 +236,6 @@ dom_xml_parser *dom_xml_parser_create(const char *enc, const char *int_enc,
parser->msg = msg;
parser->mctx = mctx;
- parser->ctx = ctx;
-
return parser;
}
@@ -311,12 +306,12 @@ dom_xml_error dom_xml_parser_completed(dom_xml_parser *parser)
/* TODO: In future, this string "id" should be extracted from the
* document schema file instead of just setting it as "id".
*/
- lerr = lwc_context_intern(parser->ctx, "id", SLEN("id"), &name);
+ lerr = lwc_intern_string("id", SLEN("id"), &name);
if (lerr != lwc_error_ok)
return _dom_exception_from_lwc_error(lerr);
_dom_document_set_id_name(parser->doc, name);
- lwc_context_string_unref(parser->ctx, name);
+ lwc_string_unref(name);
return DOM_XML_OK;
}
@@ -355,7 +350,7 @@ void xml_parser_start_document(void *ctx)
/* namespace */ NULL,
/* qname */ NULL,
/* doctype */ NULL,
- parser->alloc, parser->pw, parser->ctx, NULL,
+ parser->alloc, parser->pw, NULL,
&doc);
if (err != DOM_NO_ERR) {
parser->msg(DOM_MSG_CRITICAL, parser->mctx,
@@ -1242,7 +1237,7 @@ void xml_parser_add_document_type(dom_xml_parser *parser,
/* Create doctype */
err = dom_implementation_create_document_type(parser->impl,
qname, public_id, system_id,
- parser->alloc, parser->pw, parser->ctx, &doctype);
+ parser->alloc, parser->pw, &doctype);
if (err != DOM_NO_ERR) {
dom_string_unref(system_id);
dom_string_unref(public_id);
diff --git a/bindings/xml/xmlparser.h b/bindings/xml/xmlparser.h
index 366ceec..7bf3807 100644
--- a/bindings/xml/xmlparser.h
+++ b/bindings/xml/xmlparser.h
@@ -16,14 +16,12 @@
#include "xmlerror.h"
struct dom_document;
-struct lwc_context_s;
typedef struct dom_xml_parser dom_xml_parser;
/* Create an XML parser instance */
dom_xml_parser *dom_xml_parser_create(const char *enc, const char *int_enc,
- dom_alloc alloc, void *pw, dom_msg msg, void *mctx,
- struct lwc_context_s *ctx);
+ dom_alloc alloc, void *pw, dom_msg msg, void *mctx);
/* Destroy an XML parser instance */
void dom_xml_parser_destroy(dom_xml_parser *parser);