summaryrefslogtreecommitdiff
path: root/src/core/cdatasection.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-07-28 20:41:41 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-07-28 20:41:41 +0000
commitbb9a9029b6ec4f26ee31f4879cde52d58dcb49c0 (patch)
tree08ff52e60d85dd31ef7f22c5792cf7794eeb8736 /src/core/cdatasection.c
parent5b357e92a1cf9c515ec73e7bb6a4ff396aca6cf5 (diff)
downloadlibdom-bb9a9029b6ec4f26ee31f4879cde52d58dcb49c0.tar.gz
libdom-bb9a9029b6ec4f26ee31f4879cde52d58dcb49c0.tar.bz2
Finalisation and destruction of nodes
svn path=/trunk/dom/; revision=3467
Diffstat (limited to 'src/core/cdatasection.c')
-rw-r--r--src/core/cdatasection.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/cdatasection.c b/src/core/cdatasection.c
index c477dd7..71d3d43 100644
--- a/src/core/cdatasection.c
+++ b/src/core/cdatasection.c
@@ -54,3 +54,21 @@ dom_exception dom_cdata_section_create(struct dom_document *doc,
return DOM_NO_ERR;
}
+
+/**
+ * Destroy a CDATA section
+ *
+ * \param doc The owning document
+ * \param cdata The cdata section to destroy
+ *
+ * The contents of ::cdata will be destroyed and ::cdata will be freed.
+ */
+void dom_cdata_section_destroy(struct dom_document *doc,
+ struct dom_cdata_section *cdata)
+{
+ /* Clean up base node contents */
+ dom_text_finalise(doc, &cdata->base);
+
+ /* Destroy the node */
+ dom_document_alloc(doc, cdata, 0);
+}