summaryrefslogtreecommitdiff
path: root/test/tree.c
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-07-11 14:59:41 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-07-11 14:59:41 +0000
commitbaadfd3a8f06d72c3088ed9b44c6a327f67f57a3 (patch)
tree7e384f01204341300b7dfc7b8e05d3083a72dc52 /test/tree.c
parent55b5402adba32c8ebe66784956c3dcdbfd04e8ce (diff)
downloadlibhubbub-baadfd3a8f06d72c3088ed9b44c6a327f67f57a3.tar.gz
libhubbub-baadfd3a8f06d72c3088ed9b44c6a327f67f57a3.tar.bz2
Export a hubbub_doctype type to create_doctype() directly, rather than passing all its members as individual arguments.
svn path=/trunk/hubbub/; revision=4602
Diffstat (limited to 'test/tree.c')
-rw-r--r--test/tree.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/test/tree.c b/test/tree.c
index aee360d..a854491 100644
--- a/test/tree.c
+++ b/test/tree.c
@@ -33,8 +33,7 @@ static const uint8_t *pbuffer;
static void buffer_handler(const uint8_t *buffer, size_t len, void *pw);
static int create_comment(void *ctx, const hubbub_string *data, void **result);
-static int create_doctype(void *ctx, const hubbub_string *qname,
- const hubbub_string *public_id, const hubbub_string *system_id,
+static int create_doctype(void *ctx, const hubbub_doctype *doctype,
void **result);
static int create_element(void *ctx, const hubbub_tag *tag, void **result);
static int create_text(void *ctx, const hubbub_string *data, void **result);
@@ -224,15 +223,11 @@ int create_comment(void *ctx, const hubbub_string *data, void **result)
return 0;
}
-int create_doctype(void *ctx, const hubbub_string *qname,
- const hubbub_string *public_id, const hubbub_string *system_id,
- void **result)
+int create_doctype(void *ctx, const hubbub_doctype *doctype, void **result)
{
- UNUSED(public_id);
- UNUSED(system_id);
-
printf("Creating (%" PRIuPTR ") [doctype '%.*s']\n", ++node_counter,
- (int) qname->len, ptr_from_hubbub_string(qname));
+ (int) doctype->name.len,
+ ptr_from_hubbub_string(&doctype->name));
GROW_REF
node_ref[node_counter] = 0;