Gitweb links:
...log
http://git.netsurf-browser.org/libdom.git/shortlog/b57b8a47109d8de7a773a32e52c1263b3617149c
...commit
http://git.netsurf-browser.org/libdom.git/commit/b57b8a47109d8de7a773a32e52c1263b3617149c
...tree
http://git.netsurf-browser.org/libdom.git/tree/b57b8a47109d8de7a773a32e52c1263b3617149c
The branch, master has been updated
via b57b8a47109d8de7a773a32e52c1263b3617149c (commit)
from 9ed8fb0d80aeb7ba856085018d3bd367e9a625de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libdom.git/commit/?id=b57b8a47109d8de7a773a32e52c1263b3617149c
commit b57b8a47109d8de7a773a32e52c1263b3617149c
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
namespace: Support finalising the namespace strings
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/include/dom/dom.h b/include/dom/dom.h
index 0740fe9..1737f29 100644
--- a/include/dom/dom.h
+++ b/include/dom/dom.h
@@ -111,6 +111,12 @@ typedef enum dom_namespace {
DOM_NAMESPACE_COUNT = 7
} dom_namespace;
+/* Note, these are not valid until at least one function related to DOM
+ * namespaces has been called such as the creation of a Document.
+ */
extern dom_string *dom_namespaces[DOM_NAMESPACE_COUNT];
+/* Optional client-callable namespace cleanup function */
+extern dom_exception dom_namespace_finalise(void);
+
#endif
diff --git a/src/utils/namespace.c b/src/utils/namespace.c
index c18e24b..e2d249f 100644
--- a/src/utils/namespace.c
+++ b/src/utils/namespace.c
@@ -77,13 +77,12 @@ static dom_exception _dom_namespace_initialise(void)
return DOM_NO_ERR;
}
-#ifdef FINALISE_NAMESPACE
/**
* Finalise the namespace component
*
* \return DOM_NO_ERR on success.
*/
-dom_exception _dom_namespace_finalise(void)
+dom_exception dom_namespace_finalise(void)
{
int i;
@@ -106,7 +105,6 @@ dom_exception _dom_namespace_finalise(void)
return DOM_NO_ERR;
}
-#endif
/**
* Ensure a QName is valid
-----------------------------------------------------------------------
Summary of changes:
include/dom/dom.h | 6 ++++++
src/utils/namespace.c | 4 +---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/dom/dom.h b/include/dom/dom.h
index 0740fe9..1737f29 100644
--- a/include/dom/dom.h
+++ b/include/dom/dom.h
@@ -111,6 +111,12 @@ typedef enum dom_namespace {
DOM_NAMESPACE_COUNT = 7
} dom_namespace;
+/* Note, these are not valid until at least one function related to DOM
+ * namespaces has been called such as the creation of a Document.
+ */
extern dom_string *dom_namespaces[DOM_NAMESPACE_COUNT];
+/* Optional client-callable namespace cleanup function */
+extern dom_exception dom_namespace_finalise(void);
+
#endif
diff --git a/src/utils/namespace.c b/src/utils/namespace.c
index c18e24b..e2d249f 100644
--- a/src/utils/namespace.c
+++ b/src/utils/namespace.c
@@ -77,13 +77,12 @@ static dom_exception _dom_namespace_initialise(void)
return DOM_NO_ERR;
}
-#ifdef FINALISE_NAMESPACE
/**
* Finalise the namespace component
*
* \return DOM_NO_ERR on success.
*/
-dom_exception _dom_namespace_finalise(void)
+dom_exception dom_namespace_finalise(void)
{
int i;
@@ -106,7 +105,6 @@ dom_exception _dom_namespace_finalise(void)
return DOM_NO_ERR;
}
-#endif
/**
* Ensure a QName is valid
--
Document Object Model library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org