diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-12-05 23:52:56 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-12-05 23:52:56 +0000 |
commit | ac42344d05ec326f0063133498ec1c040e924db2 (patch) | |
tree | 4041bc41d72721a94dc573e5be3cb0f80988e004 /src/bootstrap/init_fini.c | |
parent | c9c2a632f38b736d6879caf00aa477ecf2e22dfb (diff) | |
download | libdom-ac42344d05ec326f0063133498ec1c040e924db2.tar.gz libdom-ac42344d05ec326f0063133498ec1c040e924db2.tar.bz2 |
Remove bootstrap infrastructure, and just make dom_implementation a stub.
We only support a single implementation, so all the registry and implementation list stuff is totally unnecesary and overcomplex
svn path=/trunk/dom/; revision=11017
Diffstat (limited to 'src/bootstrap/init_fini.c')
-rw-r--r-- | src/bootstrap/init_fini.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/bootstrap/init_fini.c b/src/bootstrap/init_fini.c deleted file mode 100644 index f3c7290..0000000 --- a/src/bootstrap/init_fini.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of libdom. - * Licensed under the MIT License, - * http://www.opensource.org/licenses/mit-license.php - * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> - */ - -#include <stdbool.h> - -#include <dom/bootstrap/init_fini.h> -#include <dom/bootstrap/implregistry.h> - -#include "utils/namespace.h" -#include "bootstrap/implementation.h" - -static bool __initialised; - -/** - * Initialise the dom library - * - * \param alloc Pointer to memory (de)allocation function - * \param pw Pointer to client-specific private data - * \return DOM_NO_ERR on success. - * - * This must be the first DOM library method called. - */ -dom_exception dom_initialise(dom_alloc alloc, void *pw) -{ - dom_exception err; - - /* Ensure we only initialise once */ - if (__initialised) { - return DOM_NO_ERR; - } - - err = _dom_namespace_initialise(alloc, pw); - if (err != DOM_NO_ERR) { - return err; - } - - err = dom_implregistry_initialise(alloc, pw); - if (err != DOM_NO_ERR) { - return err; - } - - err = _dom_implementation_initialise(alloc, pw); - if (err != DOM_NO_ERR) { - return err; - } - - __initialised = true; - - return DOM_NO_ERR; -} - -/** - * Finalise the dom library - * - * \return DOM_NO_ERR on success. - * - * This must be the last DOM library method called. - */ -dom_exception dom_finalise(void) -{ - dom_exception err; - - /* Ensure we only finalise once */ - if (__initialised == false) { - return DOM_NO_ERR; - } - - _dom_implementation_finalise(); - - err = _dom_namespace_finalise(); - if (err != DOM_NO_ERR) { - return err; - } - - __initialised = false; - - return DOM_NO_ERR; -} - |