diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-29 01:41:23 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-29 01:41:23 +0000 |
commit | 878df9ef2b47cd09ffe6c8c9c2324435535ef52b (patch) | |
tree | ff2739087c040f4872adef4a3d0b3731f04ebea3 /include/dom/bootstrap/init_fini.h | |
parent | 7eb2967d9be33c58e7927b7973c9dc50c9f71a62 (diff) | |
download | libdom-878df9ef2b47cd09ffe6c8c9c2324435535ef52b.tar.gz libdom-878df9ef2b47cd09ffe6c8c9c2324435535ef52b.tar.bz2 |
dom_initialise() and dom_finalise() are now completely public, rather than hidden away in a header only meant for inclusion by bindings. Client applications are responsible for initialisation and finalisation of the dom library. This must happen before/after (respectively) any call to a dom library or dom binding library function.
The reason for this change is that, if multiple bindings are required, then the dom library should still only be initialised/finalised once. Only the client can enforce this sensibly.
svn path=/trunk/dom/; revision=3606
Diffstat (limited to 'include/dom/bootstrap/init_fini.h')
-rw-r--r-- | include/dom/bootstrap/init_fini.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/dom/bootstrap/init_fini.h b/include/dom/bootstrap/init_fini.h new file mode 100644 index 0000000..5773af6 --- /dev/null +++ b/include/dom/bootstrap/init_fini.h @@ -0,0 +1,21 @@ +/* + * 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> + */ + +#ifndef dom_bootstrap_init_fini_h_ +#define dom_bootstrap_init_fini_h_ + +#include <dom/functypes.h> +#include <dom/core/exceptions.h> + +/* Initialise the DOM library */ +dom_exception dom_initialise(dom_alloc alloc, void *pw); + +/* Finalise the DOM library */ +dom_exception dom_finalise(void); + +#endif + |