diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-07-28 20:41:41 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-07-28 20:41:41 +0000 |
commit | bb9a9029b6ec4f26ee31f4879cde52d58dcb49c0 (patch) | |
tree | 08ff52e60d85dd31ef7f22c5792cf7794eeb8736 /src/core/comment.c | |
parent | 5b357e92a1cf9c515ec73e7bb6a4ff396aca6cf5 (diff) | |
download | libdom-bb9a9029b6ec4f26ee31f4879cde52d58dcb49c0.tar.gz libdom-bb9a9029b6ec4f26ee31f4879cde52d58dcb49c0.tar.bz2 |
Finalisation and destruction of nodes
svn path=/trunk/dom/; revision=3467
Diffstat (limited to 'src/core/comment.c')
-rw-r--r-- | src/core/comment.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/comment.c b/src/core/comment.c index e29edda..2e1c323 100644 --- a/src/core/comment.c +++ b/src/core/comment.c @@ -54,3 +54,21 @@ dom_exception dom_comment_create(struct dom_document *doc, return DOM_NO_ERR; } + +/** + * Destroy a comment node + * + * \param doc The owning document + * \param comment The node to destroy + * + * The contents of ::comment will be destroyed and ::comment will be freed + */ +void dom_comment_destroy(struct dom_document *doc, + struct dom_comment *comment) +{ + /* Finalise base class contents */ + dom_characterdata_finalise(doc, &comment->base); + + /* Free node */ + dom_document_alloc(doc, comment, 0); +} |