From 5b37e1f0bfd10da6720a6587e39d3dee45f77e8d Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 11 Mar 2008 16:54:30 +0000 Subject: More treebuilder (up to 8.2.4.7) Loads of issues still outstanding, including a distinct lack of error handling Change tree handler API to allow (de)referencing of nodes rather than explicit destruction. Change create_element handler to take an entire hubbub_tag rather than just the tag name -- the DOM binding can deal with the issue of attaching attributes to the created element node. svn path=/trunk/hubbub/; revision=3932 --- include/hubbub/functypes.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/hubbub/functypes.h') diff --git a/include/hubbub/functypes.h b/include/hubbub/functypes.h index 8d7f199..ee8c429 100644 --- a/include/hubbub/functypes.h +++ b/include/hubbub/functypes.h @@ -49,8 +49,8 @@ typedef int (*hubbub_tree_create_doctype)(void *ctx, const hubbub_string *qname, /** * Type of tree element node creation function */ -typedef int (*hubbub_tree_create_element)(void *ctx, - const hubbub_string *tag_name, void **result); +typedef int (*hubbub_tree_create_element)(void *ctx, const hubbub_tag *tag, + void **result); /** * Type of tree text node creation function @@ -59,9 +59,14 @@ typedef int (*hubbub_tree_create_text)(void *ctx, const hubbub_string *data, void **result); /** - * Type of tree node destruction function + * Type of tree node reference function + */ +typedef int (*hubbub_tree_ref_node)(void *ctx, void *node); + +/** + * Type of tree node dereference function */ -typedef int (*hubbub_tree_free_node)(void *ctx, void *node); +typedef int (*hubbub_tree_unref_node)(void *ctx, void *node); /** * Type of tree node appending function -- cgit v1.2.3