diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-17 00:10:56 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-09-17 00:10:56 +0000 |
commit | fbb008b9200a0e0326380366f5d0ffdbc10e4082 (patch) | |
tree | 484fc73165facbafbdb2df0a26a5aefeab21556a /src/core/document.c | |
parent | 9131bec4aac229e9f45416b83ba40dbca94d5dac (diff) | |
download | libdom-fbb008b9200a0e0326380366f5d0ffdbc10e4082.tar.gz libdom-fbb008b9200a0e0326380366f5d0ffdbc10e4082.tar.bz2 |
Make Document nodes own themselves (removes need for special case for Documents)
Fixup dom_node_destroy appropriately.
Implement dom_node_{set,get}_user_data.
svn path=/trunk/dom/; revision=3542
Diffstat (limited to 'src/core/document.c')
-rw-r--r-- | src/core/document.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/document.c b/src/core/document.c index d238558..de57f72 100644 --- a/src/core/document.c +++ b/src/core/document.c @@ -140,8 +140,10 @@ dom_exception dom_document_create(struct dom_implementation *impl, /* Initialise base class -- the Document has no parent, so * destruction will be attempted as soon as its reference count - * reaches zero. */ - err = dom_node_initialise(&d->base, NULL, DOM_DOCUMENT_NODE, + * reaches zero. Documents own themselves (this simplifies the + * rest of the code, as it doesn't need to special case Documents) + */ + err = dom_node_initialise(&d->base, d, DOM_DOCUMENT_NODE, NULL, NULL); if (err != DOM_NO_ERR) { /* Clean up interned strings */ |