diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-05 14:11:55 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-05 14:11:55 +0000 |
commit | b38b01741aa82b7bbc81fc36d34952be5a422c21 (patch) | |
tree | 0ad3d68a8e2bfd13c0ad3baa387e0ba43537d2f4 /src/core/element.h | |
parent | 557678ebe19f65307d8b50d78dffffd01fcf907e (diff) | |
download | libdom-b38b01741aa82b7bbc81fc36d34952be5a422c21.tar.gz libdom-b38b01741aa82b7bbc81fc36d34952be5a422c21.tar.bz2 |
Split out element content copying from allocation in copy constructor.
This creates a new _dom_element_copy_internal() function, which does the
copying. The old _dom_element_copy() continues to do the allocation.
This follows the same pattern as in dom_node_internal class.
Diffstat (limited to 'src/core/element.h')
-rw-r--r-- | src/core/element.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/element.h b/src/core/element.h index 5873396..c89ddc0 100644 --- a/src/core/element.h +++ b/src/core/element.h @@ -231,6 +231,11 @@ dom_exception _dom_element_copy(dom_node_internal *old, _dom_element_copy /* Helper functions*/ +dom_exception _dom_element_copy_internal(dom_element *old, + dom_element *new); +#define dom_element_copy_internal(o, n) _dom_element_copy_internal( \ + (dom_element *) (o), (dom_element *) (n)) + dom_exception _dom_element_get_id(struct dom_element *ele, dom_string **id); extern struct dom_element_vtable _dom_element_vtable; |