summaryrefslogtreecommitdiff
path: root/src/core/element.h
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2016-02-05 14:11:55 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2016-02-05 14:11:55 +0000
commitb38b01741aa82b7bbc81fc36d34952be5a422c21 (patch)
tree0ad3d68a8e2bfd13c0ad3baa387e0ba43537d2f4 /src/core/element.h
parent557678ebe19f65307d8b50d78dffffd01fcf907e (diff)
downloadlibdom-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.h5
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;