diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-10-03 23:44:32 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-10-03 23:44:32 +0000 |
commit | f3c02943d778e9b00064bf0e103aaecb06ab5e01 (patch) | |
tree | 96549872654851bdb23feafbae373060a81b10b5 /src/bootstrap/init_fini.c | |
parent | f8897a9655ac97471d34f7a4071a721e2ee46560 (diff) | |
download | libdom-f3c02943d778e9b00064bf0e103aaecb06ab5e01.tar.gz libdom-f3c02943d778e9b00064bf0e103aaecb06ab5e01.tar.bz2 |
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
Diffstat (limited to 'src/bootstrap/init_fini.c')
-rw-r--r-- | src/bootstrap/init_fini.c | 25 |
1 files changed, 20 insertions, 5 deletions
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 <dom/bootstrap/init_fini.h> +#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; } |