summaryrefslogtreecommitdiff
path: root/include/hubbub
diff options
context:
space:
mode:
Diffstat (limited to 'include/hubbub')
-rw-r--r--include/hubbub/functypes.h13
-rw-r--r--include/hubbub/parser.h3
-rw-r--r--include/hubbub/tree.h3
3 files changed, 14 insertions, 5 deletions
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
diff --git a/include/hubbub/parser.h b/include/hubbub/parser.h
index 134f4b7..5565f63 100644
--- a/include/hubbub/parser.h
+++ b/include/hubbub/parser.h
@@ -26,6 +26,7 @@ typedef enum hubbub_parser_opttype {
HUBBUB_PARSER_ERROR_HANDLER,
HUBBUB_PARSER_CONTENT_MODEL,
HUBBUB_PARSER_TREE_HANDLER,
+ HUBBUB_PARSER_DOCUMENT_NODE,
} hubbub_parser_opttype;
/**
@@ -52,6 +53,8 @@ typedef union hubbub_parser_optparams {
} content_model;
hubbub_tree_handler tree_handler;
+
+ void *document_node;
} hubbub_parser_optparams;
/* Create a hubbub parser */
diff --git a/include/hubbub/tree.h b/include/hubbub/tree.h
index a883f1a..5b82592 100644
--- a/include/hubbub/tree.h
+++ b/include/hubbub/tree.h
@@ -18,7 +18,8 @@ typedef struct hubbub_tree_handler {
hubbub_tree_create_doctype create_doctype;
hubbub_tree_create_element create_element;
hubbub_tree_create_text create_text;
- hubbub_tree_free_node free_node;
+ hubbub_tree_ref_node ref_node;
+ hubbub_tree_unref_node unref_node;
hubbub_tree_append_child append_child;
hubbub_tree_insert_before insert_before;
hubbub_tree_remove_child remove_child;