From ddbf47a33aa4fba4ce23e751db78acf59895fcc3 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 28 Jul 2007 20:41:41 +0000 Subject: Finalisation and destruction of nodes svn path=/trunk/dom/; revision=3467 --- src/core/cdatasection.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/core/cdatasection.c') 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); +} -- cgit v1.2.3