From f3c02943d778e9b00064bf0e103aaecb06ab5e01 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 3 Oct 2007 23:44:32 +0000 Subject: Make the dom string class more useful. Purge all trace of dom_string_get_data() from outside the dom string implementation. Port affected code to new, more useful, APIs. This also fixes the interned node name strings mentioned in the previous commit. svn path=/trunk/dom/; revision=3621 --- src/bootstrap/init_fini.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/init_fini.c b/src/bootstrap/init_fini.c index 001e798..a5a62a1 100644 --- a/src/bootstrap/init_fini.c +++ b/src/bootstrap/init_fini.c @@ -9,6 +9,7 @@ #include +#include "core/document.h" #include "utils/namespace.h" static bool __initialised; @@ -31,13 +32,19 @@ dom_exception dom_initialise(dom_alloc alloc, void *pw) return DOM_NO_ERR; } - err = _dom_namespace_initialise(alloc, pw); + err = _dom_document_initialise(alloc, pw); + if (err != DOM_NO_ERR) { + return err; + } - if (err == DOM_NO_ERR) { - __initialised = true; + err = _dom_namespace_initialise(alloc, pw); + if (err != DOM_NO_ERR) { + return err; } - return err; + __initialised = true; + + return DOM_NO_ERR; } /** @@ -57,9 +64,17 @@ dom_exception dom_finalise(void) } err = _dom_namespace_finalise(); + if (err != DOM_NO_ERR) { + return err; + } + + err = _dom_document_finalise(); + if (err != DOM_NO_ERR) { + return err; + } __initialised = false; - return err; + return DOM_NO_ERR; } -- cgit v1.2.3