summaryrefslogtreecommitdiff
path: root/include/dom/core
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-04-07 23:28:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-04-07 23:28:32 +0000
commit4ade8ad1c7b23e6eeeee6681acbdb43fb10cab43 (patch)
tree545dfc0006eeddcd000a1071c7c62afe3e47e5b5 /include/dom/core
parentd24960dac782ef8e54ed91692f6aec1dd6d08bc1 (diff)
downloadlibdom-4ade8ad1c7b23e6eeeee6681acbdb43fb10cab43.tar.gz
libdom-4ade8ad1c7b23e6eeeee6681acbdb43fb10cab43.tar.bz2
s/struct dom_string/dom_string/g
svn path=/trunk/libdom/; revision=12172
Diffstat (limited to 'include/dom/core')
-rw-r--r--include/dom/core/attr.h19
-rw-r--r--include/dom/core/characterdata.h38
-rw-r--r--include/dom/core/document.h137
-rw-r--r--include/dom/core/document_type.h25
-rw-r--r--include/dom/core/element.h135
-rw-r--r--include/dom/core/namednodemap.h14
-rw-r--r--include/dom/core/node.h116
-rw-r--r--include/dom/core/string.h48
-rw-r--r--include/dom/core/text.h13
-rw-r--r--include/dom/core/typeinfo.h17
10 files changed, 277 insertions, 285 deletions
diff --git a/include/dom/core/attr.h b/include/dom/core/attr.h
index f5105f7..10d4a79 100644
--- a/include/dom/core/attr.h
+++ b/include/dom/core/attr.h
@@ -17,7 +17,6 @@ struct dom_element;
struct dom_type_info;
struct dom_node;
struct dom_attr;
-struct dom_string;
typedef struct dom_attr dom_attr;
@@ -37,13 +36,13 @@ typedef struct dom_attr_vtable {
struct dom_node_vtable base;
dom_exception (*dom_attr_get_name)(struct dom_attr *attr,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_attr_get_specified)(struct dom_attr *attr,
bool *result);
dom_exception (*dom_attr_get_value)(struct dom_attr *attr,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_attr_set_value)(struct dom_attr *attr,
- struct dom_string *value);
+ dom_string *value);
dom_exception (*dom_attr_get_owner_element)(struct dom_attr *attr,
struct dom_element **result);
dom_exception (*dom_attr_get_schema_type_info)(struct dom_attr *attr,
@@ -52,13 +51,13 @@ typedef struct dom_attr_vtable {
} dom_attr_vtable;
static inline dom_exception dom_attr_get_name(struct dom_attr *attr,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_attr_vtable *) ((dom_node *) attr)->vtable)->
dom_attr_get_name(attr, result);
}
#define dom_attr_get_name(a, r) dom_attr_get_name((struct dom_attr *) (a), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_attr_get_specified(struct dom_attr *attr,
bool *result)
@@ -70,22 +69,22 @@ static inline dom_exception dom_attr_get_specified(struct dom_attr *attr,
(struct dom_attr *) (a), (bool *) (r))
static inline dom_exception dom_attr_get_value(struct dom_attr *attr,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_attr_vtable *) ((dom_node *) attr)->vtable)->
dom_attr_get_value(attr, result);
}
#define dom_attr_get_value(a, r) dom_attr_get_value((struct dom_attr *) (a), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_attr_set_value(struct dom_attr *attr,
- struct dom_string *value)
+ dom_string *value)
{
return ((dom_attr_vtable *) ((dom_node *) attr)->vtable)->
dom_attr_set_value(attr, value);
}
#define dom_attr_set_value(a, v) dom_attr_set_value((struct dom_attr *) (a), \
- (struct dom_string *) (v))
+ (dom_string *) (v))
static inline dom_exception dom_attr_get_owner_element(struct dom_attr *attr,
struct dom_element **result)
diff --git a/include/dom/core/characterdata.h b/include/dom/core/characterdata.h
index 745407c..322fb03 100644
--- a/include/dom/core/characterdata.h
+++ b/include/dom/core/characterdata.h
@@ -11,8 +11,6 @@
#include <dom/core/exceptions.h>
#include <dom/core/node.h>
-struct dom_string;
-
typedef struct dom_characterdata dom_characterdata;
/* The vtable for characterdata */
@@ -21,48 +19,48 @@ typedef struct dom_characterdata_vtable {
dom_exception (*dom_characterdata_get_data)(
struct dom_characterdata *cdata,
- struct dom_string **data);
+ dom_string **data);
dom_exception (*dom_characterdata_set_data)(
struct dom_characterdata *cdata,
- struct dom_string *data);
+ dom_string *data);
dom_exception (*dom_characterdata_get_length)(
struct dom_characterdata *cdata,
unsigned long *length);
dom_exception (*dom_characterdata_substring_data)(
struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, struct dom_string **data);
+ unsigned long count, dom_string **data);
dom_exception (*dom_characterdata_append_data)(
struct dom_characterdata *cdata,
- struct dom_string *data);
+ dom_string *data);
dom_exception (*dom_characterdata_insert_data)(
struct dom_characterdata *cdata,
- unsigned long offset, struct dom_string *data);
+ unsigned long offset, dom_string *data);
dom_exception (*dom_characterdata_delete_data)(
struct dom_characterdata *cdata,
unsigned long offset, unsigned long count);
dom_exception (*dom_characterdata_replace_data)(
struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, struct dom_string *data);
+ unsigned long count, dom_string *data);
} dom_characterdata_vtable;
static inline dom_exception dom_characterdata_get_data(
- struct dom_characterdata *cdata, struct dom_string **data)
+ struct dom_characterdata *cdata, dom_string **data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_get_data(cdata, data);
}
#define dom_characterdata_get_data(c, d) dom_characterdata_get_data( \
- (struct dom_characterdata *) (c), (struct dom_string **) (d))
+ (struct dom_characterdata *) (c), (dom_string **) (d))
static inline dom_exception dom_characterdata_set_data(
- struct dom_characterdata *cdata, struct dom_string *data)
+ struct dom_characterdata *cdata, dom_string *data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_set_data(cdata, data);
}
#define dom_characterdata_set_data(c, d) dom_characterdata_set_data( \
- (struct dom_characterdata *) (c), (struct dom_string *) (d))
+ (struct dom_characterdata *) (c), (dom_string *) (d))
static inline dom_exception dom_characterdata_get_length(
struct dom_characterdata *cdata, unsigned long *length)
@@ -75,7 +73,7 @@ static inline dom_exception dom_characterdata_get_length(
static inline dom_exception dom_characterdata_substring_data(
struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, struct dom_string **data)
+ unsigned long count, dom_string **data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_substring_data(cdata, offset, count,
@@ -84,27 +82,27 @@ static inline dom_exception dom_characterdata_substring_data(
#define dom_characterdata_substring_data(c, o, ct, d) \
dom_characterdata_substring_data( \
(struct dom_characterdata *) (c), (unsigned long) (o), \
- (unsigned long) (ct), (struct dom_string **) (d))
+ (unsigned long) (ct), (dom_string **) (d))
static inline dom_exception dom_characterdata_append_data(
- struct dom_characterdata *cdata, struct dom_string *data)
+ struct dom_characterdata *cdata, dom_string *data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_append_data(cdata, data);
}
#define dom_characterdata_append_data(c, d) dom_characterdata_append_data( \
- (struct dom_characterdata *) (c), (struct dom_string *) (d))
+ (struct dom_characterdata *) (c), (dom_string *) (d))
static inline dom_exception dom_characterdata_insert_data(
struct dom_characterdata *cdata, unsigned long offset,
- struct dom_string *data)
+ dom_string *data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_insert_data(cdata, offset, data);
}
#define dom_characterdata_insert_data(c, o, d) dom_characterdata_insert_data( \
(struct dom_characterdata *) (c), (unsigned long) (o), \
- (struct dom_string *) (d))
+ (dom_string *) (d))
static inline dom_exception dom_characterdata_delete_data(
struct dom_characterdata *cdata, unsigned long offset,
@@ -119,7 +117,7 @@ static inline dom_exception dom_characterdata_delete_data(
static inline dom_exception dom_characterdata_replace_data(
struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, struct dom_string *data)
+ unsigned long count, dom_string *data)
{
return ((dom_characterdata_vtable *) ((dom_node *) cdata)->vtable)->
dom_characterdata_replace_data(cdata, offset, count,
@@ -128,6 +126,6 @@ static inline dom_exception dom_characterdata_replace_data(
#define dom_characterdata_replace_data(c, o, ct, d) \
dom_characterdata_replace_data(\
(struct dom_characterdata *) (c), (unsigned long) (o),\
- (unsigned long) (ct), (struct dom_string *) (d))
+ (unsigned long) (ct), (dom_string *) (d))
#endif
diff --git a/include/dom/core/document.h b/include/dom/core/document.h
index ebe82b8..58d4639 100644
--- a/include/dom/core/document.h
+++ b/include/dom/core/document.h
@@ -29,7 +29,6 @@ struct dom_entity_reference;
struct dom_node;
struct dom_nodelist;
struct dom_processing_instruction;
-struct dom_string;
struct dom_text;
struct lwc_string_s;
@@ -47,74 +46,74 @@ typedef struct dom_document_vtable {
dom_exception (*dom_document_get_document_element)(
struct dom_document *doc, struct dom_element **result);
dom_exception (*dom_document_create_element)(struct dom_document *doc,
- struct dom_string *tag_name,
+ dom_string *tag_name,
struct dom_element **result);
dom_exception (*dom_document_create_document_fragment)(
struct dom_document *doc,
struct dom_document_fragment **result);
dom_exception (*dom_document_create_text_node)(struct dom_document *doc,
- struct dom_string *data, struct dom_text **result);
+ dom_string *data, struct dom_text **result);
dom_exception (*dom_document_create_comment)(struct dom_document *doc,
- struct dom_string *data, struct dom_comment **result);
+ dom_string *data, struct dom_comment **result);
dom_exception (*dom_document_create_cdata_section)(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_cdata_section **result);
dom_exception (*dom_document_create_processing_instruction)(
- struct dom_document *doc, struct dom_string *target,
- struct dom_string *data,
+ struct dom_document *doc, dom_string *target,
+ dom_string *data,
struct dom_processing_instruction **result);
dom_exception (*dom_document_create_attribute)(struct dom_document *doc,
- struct dom_string *name, struct dom_attr **result);
+ dom_string *name, struct dom_attr **result);
dom_exception (*dom_document_create_entity_reference)(
- struct dom_document *doc, struct dom_string *name,
+ struct dom_document *doc, dom_string *name,
struct dom_entity_reference **result);
dom_exception (*dom_document_get_elements_by_tag_name)(
- struct dom_document *doc, struct dom_string *tagname,
+ struct dom_document *doc, dom_string *tagname,
struct dom_nodelist **result);
dom_exception (*dom_document_import_node)(struct dom_document *doc,
struct dom_node *node, bool deep,
struct dom_node **result);
dom_exception (*dom_document_create_element_ns)(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_element **result);
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_element **result);
dom_exception (*dom_document_create_attribute_ns)(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_attr **result);
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_attr **result);
dom_exception (*dom_document_get_elements_by_tag_name_ns)(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *localname,
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *localname,
struct dom_nodelist **result);
dom_exception (*dom_document_get_element_by_id)(
- struct dom_document *doc, struct dom_string *id,
+ struct dom_document *doc, dom_string *id,
struct dom_element **result);
dom_exception (*dom_document_get_input_encoding)(
- struct dom_document *doc, struct dom_string **result);
+ struct dom_document *doc, dom_string **result);
dom_exception (*dom_document_get_xml_encoding)(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_get_xml_standalone)(
struct dom_document *doc, bool *result);
dom_exception (*dom_document_set_xml_standalone)(
struct dom_document *doc, bool standalone);
dom_exception (*dom_document_get_xml_version)(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_set_xml_version)(struct dom_document *doc,
- struct dom_string *version);
+ dom_string *version);
dom_exception (*dom_document_get_strict_error_checking)(
struct dom_document *doc, bool *result);
dom_exception (*dom_document_set_strict_error_checking)(
struct dom_document *doc, bool strict);
dom_exception (*dom_document_get_uri)(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_set_uri)(struct dom_document *doc,
- struct dom_string *uri);
+ dom_string *uri);
dom_exception (*dom_document_adopt_node)(struct dom_document *doc,
struct dom_node *node, struct dom_node **result);
dom_exception (*dom_document_get_dom_config)(struct dom_document *doc,
struct dom_configuration **result);
dom_exception (*dom_document_normalize)(struct dom_document *doc);
dom_exception (*dom_document_rename_node)(struct dom_document *doc,
- struct dom_node *node, struct dom_string *namespace,
- struct dom_string *qname, struct dom_node **result);
+ struct dom_node *node, dom_string *namespace,
+ dom_string *qname, struct dom_node **result);
} dom_document_vtable;
static inline dom_exception dom_document_get_doctype(struct dom_document *doc,
@@ -146,14 +145,14 @@ static inline dom_exception dom_document_get_document_element(
(struct dom_element **) (r))
static inline dom_exception dom_document_create_element(
- struct dom_document *doc, struct dom_string *tag_name,
+ struct dom_document *doc, dom_string *tag_name,
struct dom_element **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_element(doc, tag_name, result);
}
#define dom_document_create_element(d, t, r) dom_document_create_element( \
- (dom_document *) (d), (struct dom_string *) (t), \
+ (dom_document *) (d), (dom_string *) (t), \
(struct dom_element **) (r))
static inline dom_exception dom_document_create_document_fragment(
@@ -168,7 +167,7 @@ static inline dom_exception dom_document_create_document_fragment(
(struct dom_document_fragment **) (r))
static inline dom_exception dom_document_create_text_node(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_text **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -176,21 +175,21 @@ static inline dom_exception dom_document_create_text_node(
}
#define dom_document_create_text_node(d, data, r) \
dom_document_create_text_node((dom_document *) (d), \
- (struct dom_string *) (data), (struct dom_text **) (r))
+ (dom_string *) (data), (struct dom_text **) (r))
static inline dom_exception dom_document_create_comment(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_comment **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_comment(doc, data, result);
}
#define dom_document_create_comment(d, data, r) dom_document_create_comment( \
- (dom_document *) (d), (struct dom_string *) (data), \
+ (dom_document *) (d), (dom_string *) (data), \
(struct dom_comment **) (r))
static inline dom_exception dom_document_create_cdata_section(
- struct dom_document *doc, struct dom_string *data,
+ struct dom_document *doc, dom_string *data,
struct dom_cdata_section **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -198,12 +197,12 @@ static inline dom_exception dom_document_create_cdata_section(
}
#define dom_document_create_cdata_section(d, data, r) \
dom_document_create_cdata_section((dom_document *) (d), \
- (struct dom_string *) (data), \
+ (dom_string *) (data), \
(struct dom_cdata_section **) (r))
static inline dom_exception dom_document_create_processing_instruction(
- struct dom_document *doc, struct dom_string *target,
- struct dom_string *data,
+ struct dom_document *doc, dom_string *target,
+ dom_string *data,
struct dom_processing_instruction **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -212,23 +211,23 @@ static inline dom_exception dom_document_create_processing_instruction(
}
#define dom_document_create_processing_instruction(d, t, data, r) \
dom_document_create_processing_instruction( \
- (dom_document *) (d), (struct dom_string *) (t), \
- (struct dom_string *) (data), \
+ (dom_document *) (d), (dom_string *) (t), \
+ (dom_string *) (data), \
(struct dom_processing_instruction **) (r))
static inline dom_exception dom_document_create_attribute(
- struct dom_document *doc, struct dom_string *name,
+ struct dom_document *doc, dom_string *name,
struct dom_attr **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_attribute(doc, name, result);
}
#define dom_document_create_attribute(d, n, r) dom_document_create_attribute( \
- (dom_document *) (d), (struct dom_string *) (n), \
+ (dom_document *) (d), (dom_string *) (n), \
(struct dom_attr **) (r))
static inline dom_exception dom_document_create_entity_reference(
- struct dom_document *doc, struct dom_string *name,
+ struct dom_document *doc, dom_string *name,
struct dom_entity_reference **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -237,10 +236,10 @@ static inline dom_exception dom_document_create_entity_reference(
}
#define dom_document_create_entity_reference(d, n, r) \
dom_document_create_entity_reference((dom_document *) (d), \
- (struct dom_string *) (n), (struct dom_entity_reference **) (r))
+ (dom_string *) (n), (struct dom_entity_reference **) (r))
static inline dom_exception dom_document_get_elements_by_tag_name(
- struct dom_document *doc, struct dom_string *tagname,
+ struct dom_document *doc, dom_string *tagname,
struct dom_nodelist **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -249,7 +248,7 @@ static inline dom_exception dom_document_get_elements_by_tag_name(
}
#define dom_document_get_elements_by_tag_name(d, t, r) \
dom_document_get_elements_by_tag_name((dom_document *) (d), \
- (struct dom_string *) (t), (struct dom_nodelist **) (r))
+ (dom_string *) (t), (struct dom_nodelist **) (r))
static inline dom_exception dom_document_import_node(struct dom_document *doc,
struct dom_node *node, bool deep, struct dom_node **result)
@@ -262,8 +261,8 @@ static inline dom_exception dom_document_import_node(struct dom_document *doc,
(dom_node **) (r))
static inline dom_exception dom_document_create_element_ns(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_element **result)
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_element **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_element_ns(doc, namespace,
@@ -271,12 +270,12 @@ static inline dom_exception dom_document_create_element_ns(
}
#define dom_document_create_element_ns(d, n, q, r) \
dom_document_create_element_ns((dom_document *) (d), \
- (struct dom_string *) (n), (struct dom_string *) (q), \
+ (dom_string *) (n), (dom_string *) (q), \
(struct dom_element **) (r))
static inline dom_exception dom_document_create_attribute_ns
- (struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *qname, struct dom_attr **result)
+ (struct dom_document *doc, dom_string *namespace,
+ dom_string *qname, struct dom_attr **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_create_attribute_ns(doc, namespace,
@@ -284,12 +283,12 @@ static inline dom_exception dom_document_create_attribute_ns
}
#define dom_document_create_attribute_ns(d, n, q, r) \
dom_document_create_attribute_ns((dom_document *) (d), \
- (struct dom_string *) (n), (struct dom_string *) (q), \
+ (dom_string *) (n), (dom_string *) (q), \
(struct dom_attr **) (r))
static inline dom_exception dom_document_get_elements_by_tag_name_ns(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result)
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_elements_by_tag_name_ns(doc,
@@ -297,11 +296,11 @@ static inline dom_exception dom_document_get_elements_by_tag_name_ns(
}
#define dom_document_get_elements_by_tag_name_ns(d, n, l, r) \
dom_document_get_elements_by_tag_name_ns((dom_document *) (d),\
- (struct dom_string *) (n), (struct dom_string *) (l), \
+ (dom_string *) (n), (dom_string *) (l), \
(struct dom_nodelist **) (r))
static inline dom_exception dom_document_get_element_by_id(
- struct dom_document *doc, struct dom_string *id,
+ struct dom_document *doc, dom_string *id,
struct dom_element **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -309,25 +308,25 @@ static inline dom_exception dom_document_get_element_by_id(
}
#define dom_document_get_element_by_id(d, i, r) \
dom_document_get_element_by_id((dom_document *) (d), \
- (struct dom_string *) (i), (struct dom_element **) (r))
+ (dom_string *) (i), (struct dom_element **) (r))
static inline dom_exception dom_document_get_input_encoding(
- struct dom_document *doc, struct dom_string **result)
+ struct dom_document *doc, dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_input_encoding(doc, result);
}
#define dom_document_get_input_encoding(d, r) dom_document_get_input_encoding(\
- (dom_document *) (d), (struct dom_string **) (r))
+ (dom_document *) (d), (dom_string **) (r))
static inline dom_exception dom_document_get_xml_encoding(
- struct dom_document *doc, struct dom_string **result)
+ struct dom_document *doc, dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_xml_encoding(doc, result);
}
#define dom_document_get_xml_encoding(d, r) dom_document_get_xml_encoding( \
- (dom_document *) (d), (struct dom_string **) (r))
+ (dom_document *) (d), (dom_string **) (r))
static inline dom_exception dom_document_get_xml_standalone(
struct dom_document *doc, bool *result)
@@ -348,22 +347,22 @@ static inline dom_exception dom_document_set_xml_standalone(
(dom_document *) (d), (bool) (s))
static inline dom_exception dom_document_get_xml_version(
- struct dom_document *doc, struct dom_string **result)
+ struct dom_document *doc, dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_xml_version(doc, result);
}
#define dom_document_get_xml_version(d, r) dom_document_get_xml_version( \
- (dom_document *) (d), (struct dom_string **) (r))
+ (dom_document *) (d), (dom_string **) (r))
static inline dom_exception dom_document_set_xml_version(
- struct dom_document *doc, struct dom_string *version)
+ struct dom_document *doc, dom_string *version)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_set_xml_version(doc, version);
}
#define dom_document_set_xml_version(d, v) dom_document_set_xml_version( \
- (dom_document *) (d), (struct dom_string *) (v))
+ (dom_document *) (d), (dom_string *) (v))
static inline dom_exception dom_document_get_strict_error_checking(
struct dom_document *doc, bool *result)
@@ -386,22 +385,22 @@ static inline dom_exception dom_document_set_strict_error_checking(
(bool) (s))
static inline dom_exception dom_document_get_uri(struct dom_document *doc,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_get_uri(doc, result);
}
#define dom_document_get_uri(d, r) dom_document_get_uri((dom_document *) (d), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_document_set_uri(struct dom_document *doc,
- struct dom_string *uri)
+ dom_string *uri)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
dom_document_set_uri(doc, uri);
}
#define dom_document_set_uri(d, u) dom_document_set_uri((dom_document *) (d), \
- (struct dom_string *) (u))
+ (dom_string *) (u))
static inline dom_exception dom_document_adopt_node(struct dom_document *doc,
struct dom_node *node, struct dom_node **result)
@@ -430,7 +429,7 @@ static inline dom_exception dom_document_normalize(struct dom_document *doc)
static inline dom_exception dom_document_rename_node(struct dom_document *doc,
struct dom_node *node,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_node **result)
{
return ((dom_document_vtable *) ((dom_node *) doc)->vtable)->
@@ -438,7 +437,7 @@ static inline dom_exception dom_document_rename_node(struct dom_document *doc,
result);
}
#define dom_document_rename_node(d, n, ns, q, r) dom_document_rename_node( \
- (dom_document *) (d), (struct dom_string *) (ns), \
- (struct dom_string *) (q), (dom_node **) (r))
+ (dom_document *) (d), (dom_string *) (ns), \
+ (dom_string *) (q), (dom_node **) (r))
#endif
diff --git a/include/dom/core/document_type.h b/include/dom/core/document_type.h
index fdba202..989ff69 100644
--- a/include/dom/core/document_type.h
+++ b/include/dom/core/document_type.h
@@ -13,7 +13,6 @@
#include <dom/core/node.h>
struct dom_namednodemap;
-struct dom_string;
typedef struct dom_document_type dom_document_type;
/* The Dom DocumentType vtable */
@@ -22,7 +21,7 @@ typedef struct dom_document_type_vtable {
dom_exception (*dom_document_type_get_name)(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_type_get_entities)(
struct dom_document_type *doc_type,
struct dom_namednodemap **result);
@@ -31,23 +30,23 @@ typedef struct dom_document_type_vtable {
struct dom_namednodemap **result);
dom_exception (*dom_document_type_get_public_id)(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_type_get_system_id)(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_document_type_get_internal_subset)(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
} dom_document_type_vtable;
static inline dom_exception dom_document_type_get_name(
- struct dom_document_type *doc_type, struct dom_string **result)
+ struct dom_document_type *doc_type, dom_string **result)
{
return ((dom_document_type_vtable *) ((dom_node *) (doc_type))->vtable)
->dom_document_type_get_name(doc_type, result);
}
#define dom_document_type_get_name(dt, r) dom_document_type_get_name( \
- (dom_document_type *) (dt), (struct dom_string **) (r))
+ (dom_document_type *) (dt), (dom_string **) (r))
static inline dom_exception dom_document_type_get_entities(
struct dom_document_type *doc_type,
@@ -71,29 +70,29 @@ static inline dom_exception dom_document_type_get_notations(
static inline dom_exception dom_document_type_get_public_id(
struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_document_type_vtable *) ((dom_node *) (doc_type))->vtable)
->dom_document_type_get_public_id(doc_type, result);
}
#define dom_document_type_get_public_id(dt, r) \
dom_document_type_get_public_id((dom_document_type *) (dt), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_document_type_get_system_id(
struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_document_type_vtable *) ((dom_node *) (doc_type))->vtable)
->dom_document_type_get_system_id(doc_type, result);
}
#define dom_document_type_get_system_id(dt, r) \
dom_document_type_get_system_id((dom_document_type *) (dt), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_document_type_get_internal_subset(
struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_document_type_vtable *) ((dom_node *) (doc_type))->vtable)
->dom_document_type_get_internal_subset(doc_type,
@@ -101,7 +100,7 @@ static inline dom_exception dom_document_type_get_internal_subset(
}
#define dom_document_type_get_internal_subset(dt, r) \
dom_document_type_get_internal_subset( \
- (dom_document_type *) (dt), (struct dom_string **) (r))
+ (dom_document_type *) (dt), (dom_string **) (r))
#endif
diff --git a/include/dom/core/element.h b/include/dom/core/element.h
index 4cffa2c..c77335b 100644
--- a/include/dom/core/element.h
+++ b/include/dom/core/element.h
@@ -15,7 +15,6 @@
struct dom_attr;
struct dom_nodelist;
-struct dom_string;
struct dom_type_info;
typedef struct dom_element dom_element;
@@ -25,15 +24,15 @@ typedef struct dom_element_vtable {
struct dom_node_vtable base;
dom_exception (*dom_element_get_tag_name)(struct dom_element *element,
- struct dom_string **name);
+ dom_string **name);
dom_exception (*dom_element_get_attribute)(struct dom_element *element,
- struct dom_string *name, struct dom_string **value);
+ dom_string *name, dom_string **value);
dom_exception (*dom_element_set_attribute)(struct dom_element *element,
- struct dom_string *name, struct dom_string *value);
+ dom_string *name, dom_string *value);
dom_exception (*dom_element_remove_attribute)(
- struct dom_element *element, struct dom_string *name);
+ struct dom_element *element, dom_string *name);
dom_exception (*dom_element_get_attribute_node)(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
struct dom_attr **result);
dom_exception (*dom_element_set_attribute_node)(
struct dom_element *element, struct dom_attr *attr,
@@ -42,96 +41,96 @@ typedef struct dom_element_vtable {
struct dom_element *element, struct dom_attr *attr,
struct dom_attr **result);
dom_exception (*dom_element_get_elements_by_tag_name)(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
struct dom_nodelist **result);
dom_exception (*dom_element_get_attribute_ns)(
struct dom_element *element,
- struct dom_string *namespace,
- struct dom_string *localname,
- struct dom_string **value);
+ dom_string *namespace,
+ dom_string *localname,
+ dom_string **value);
dom_exception (*dom_element_set_attribute_ns)(
struct dom_element *element,
- struct dom_string *namespace, struct dom_string *qname,
- struct dom_string *value);
+ dom_string *namespace, dom_string *qname,
+ dom_string *value);
dom_exception (*dom_element_remove_attribute_ns)(
struct dom_element *element,
- struct dom_string *namespace,
- struct dom_string *localname);
+ dom_string *namespace,
+ dom_string *localname);
dom_exception (*dom_element_get_attribute_node_ns)(
struct dom_element *element,
- struct dom_string *namespace,
- struct dom_string *localname, struct dom_attr **result);
+ dom_string *namespace,
+ dom_string *localname, struct dom_attr **result);
dom_exception (*dom_element_set_attribute_node_ns)(
struct dom_element *element, struct dom_attr *attr,
struct dom_attr **result);
dom_exception (*dom_element_get_elements_by_tag_name_ns)(
struct dom_element *element,
- struct dom_string *namespace,
- struct dom_string *localname,
+ dom_string *namespace,
+ dom_string *localname,
struct dom_nodelist **result);
dom_exception (*dom_element_has_attribute)(struct dom_element *element,
- struct dom_string *name, bool *result);
+ dom_string *name, bool *result);
dom_exception (*dom_element_has_attribute_ns)(
struct dom_element *element,
- struct dom_string *namespace,
- struct dom_string *localname, bool *result);
+ dom_string *namespace,
+ dom_string *localname, bool *result);
dom_exception (*dom_element_get_schema_type_info)(
struct dom_element *element,
struct dom_type_info **result);
dom_exception (*dom_element_set_id_attribute)(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
bool is_id);
dom_exception (*dom_element_set_id_attribute_ns)(
struct dom_element *element,
- struct dom_string *namespace,
- struct dom_string *localname, bool is_id);
+ dom_string *namespace,
+ dom_string *localname, bool is_id);
dom_exception (*dom_element_set_id_attribute_node)(
struct dom_element *element,
struct dom_attr *id_attr, bool is_id);
} dom_element_vtable;
static inline dom_exception dom_element_get_tag_name(
- struct dom_element *element, struct dom_string **name)
+ struct dom_element *element, dom_string **name)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_get_tag_name(element, name);
}
#define dom_element_get_tag_name(e, n) dom_element_get_tag_name( \
- (dom_element *) (e), (struct dom_string **) (n))
+ (dom_element *) (e), (dom_string **) (n))
static inline dom_exception dom_element_get_attribute(
- struct dom_element *element, struct dom_string *name,
- struct dom_string **value)
+ struct dom_element *element, dom_string *name,
+ dom_string **value)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_get_attribute(element, name, value);
}
#define dom_element_get_attribute(e, n, v) dom_element_get_attribute( \
- (dom_element *) (e), (struct dom_string *) (n), \
- (struct dom_string **) (v))
+ (dom_element *) (e), (dom_string *) (n), \
+ (dom_string **) (v))
static inline dom_exception dom_element_set_attribute(
- struct dom_element *element, struct dom_string *name,
- struct dom_string *value)
+ struct dom_element *element, dom_string *name,
+ dom_string *value)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_set_attribute(element, name, value);
}
#define dom_element_set_attribute(e, n, v) dom_element_set_attribute( \
- (dom_element *) (e), (struct dom_string *) (n), \
- (struct dom_string *) (v))
+ (dom_element *) (e), (dom_string *) (n), \
+ (dom_string *) (v))
static inline dom_exception dom_element_remove_attribute(
- struct dom_element *element, struct dom_string *name)
+ struct dom_element *element, dom_string *name)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_remove_attribute(element, name);
}
#define dom_element_remove_attribute(e, n) dom_element_remove_attribute( \
- (dom_element *) (e), (struct dom_string *) (n))
+ (dom_element *) (e), (dom_string *) (n))
static inline dom_exception dom_element_get_attribute_node(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
struct dom_attr **result)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
@@ -139,7 +138,7 @@ static inline dom_exception dom_element_get_attribute_node(
}
#define dom_element_get_attribute_node(e, n, r) \
dom_element_get_attribute_node((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_attr **) (r))
+ (dom_string *) (n), (struct dom_attr **) (r))
static inline dom_exception dom_element_set_attribute_node(
struct dom_element *element, struct dom_attr *attr,
@@ -166,7 +165,7 @@ static inline dom_exception dom_element_remove_attribute_node(
static inline dom_exception dom_element_get_elements_by_tag_name(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
struct dom_nodelist **result)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
@@ -175,11 +174,11 @@ static inline dom_exception dom_element_get_elements_by_tag_name(
}
#define dom_element_get_elements_by_tag_name(e, n, r) \
dom_element_get_elements_by_tag_name((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_nodelist **) (r))
+ (dom_string *) (n), (struct dom_nodelist **) (r))
static inline dom_exception dom_element_get_attribute_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, struct dom_string **value)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, dom_string **value)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_get_attribute_ns(element, namespace,
@@ -187,12 +186,12 @@ static inline dom_exception dom_element_get_attribute_ns(
}
#define dom_element_get_attribute_ns(e, n, l, v) \
dom_element_get_attribute_ns((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_string *) (l), \
- (struct dom_string **) (v))
+ (dom_string *) (n), (dom_string *) (l), \
+ (dom_string **) (v))
static inline dom_exception dom_element_set_attribute_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *qname, struct dom_string *value)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *qname, dom_string *value)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_set_attribute_ns(element, namespace,
@@ -200,13 +199,13 @@ static inline dom_exception dom_element_set_attribute_ns(
}
#define dom_element_set_attribute_ns(e, n, l, v) \
dom_element_set_attribute_ns((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_string *) (l), \
- (struct dom_string *) (v))
+ (dom_string *) (n), (dom_string *) (l), \
+ (dom_string *) (v))
static inline dom_exception dom_element_remove_attribute_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_remove_attribute_ns(element, namespace,
@@ -214,12 +213,12 @@ static inline dom_exception dom_element_remove_attribute_ns(
}
#define dom_element_remove_attribute_ns(e, n, l) \
dom_element_remove_attribute_ns((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_string *) (l))
+ (dom_string *) (n), (dom_string *) (l))
static inline dom_exception dom_element_get_attribute_node_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, struct dom_attr **result)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, struct dom_attr **result)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_get_attribute_node_ns(element, namespace,
@@ -227,7 +226,7 @@ static inline dom_exception dom_element_get_attribute_node_ns(
}
#define dom_element_get_attribute_node_ns(e, n, l, r) \
dom_element_get_attribute_node_ns((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_string *) (l), \
+ (dom_string *) (n), (dom_string *) (l), \
(struct dom_attr **) (r))
static inline dom_exception dom_element_set_attribute_node_ns(
@@ -243,8 +242,8 @@ static inline dom_exception dom_element_set_attribute_node_ns(
(struct dom_attr *) (a), (struct dom_attr **) (r))
static inline dom_exception dom_element_get_elements_by_tag_name_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_get_elements_by_tag_name_ns(element,
@@ -252,31 +251,31 @@ static inline dom_exception dom_element_get_elements_by_tag_name_ns(
}
#define dom_element_get_elements_by_tag_name_ns(e, n, l, r) \
dom_element_get_elements_by_tag_name_ns((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_string *) (l), \
+ (dom_string *) (n), (dom_string *) (l), \
(struct dom_nodelist **) (r))
static inline dom_exception dom_element_has_attribute(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
bool *result)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_has_attribute(element, name, result);
}
#define dom_element_has_attribute(e, n, r) dom_element_has_attribute( \
- (dom_element *) (e), (struct dom_string *) (n), \
+ (dom_element *) (e), (dom_string *) (n), \
(bool *) (r))
static inline dom_exception dom_element_has_attribute_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, bool *result)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, bool *result)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_has_attribute_ns(element, namespace,
localname, result);
}
#define dom_element_has_attribute_ns(e, n, l, r) dom_element_has_attribute_ns(\
- (dom_element *) (e), (struct dom_string *) (n), \
- (struct dom_string *) (l), (bool *) (r))
+ (dom_element *) (e), (dom_string *) (n), \
+ (dom_string *) (l), (bool *) (r))
static inline dom_exception dom_element_get_schema_type_info(
struct dom_element *element, struct dom_type_info **result)
@@ -289,7 +288,7 @@ static inline dom_exception dom_element_get_schema_type_info(
(struct dom_type_info **) (r))
static inline dom_exception dom_element_set_id_attribute(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
bool is_id)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
@@ -297,11 +296,11 @@ static inline dom_exception dom_element_set_id_attribute(
}
#define dom_element_set_id_attribute(e, n, i) \
dom_element_set_id_attribute((dom_element *) (e), \
- (struct dom_string *) (n), (bool) (i))
+ (dom_string *) (n), (bool) (i))
static inline dom_exception dom_element_set_id_attribute_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, bool is_id)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, bool is_id)
{
return ((dom_element_vtable *) ((dom_node *) element)->vtable)->
dom_element_set_id_attribute_ns(element, namespace,
@@ -309,7 +308,7 @@ static inline dom_exception dom_element_set_id_attribute_ns(
}
#define dom_element_set_id_attribute_ns(e, n, l, i) \
dom_element_set_id_attribute_ns((dom_element *) (e), \
- (struct dom_string *) (n), (struct dom_string *) (l), \
+ (dom_string *) (n), (dom_string *) (l), \
(bool) (i))
static inline dom_exception dom_element_set_id_attribute_node(
diff --git a/include/dom/core/namednodemap.h b/include/dom/core/namednodemap.h
index a39983e..ad2494b 100644
--- a/include/dom/core/namednodemap.h
+++ b/include/dom/core/namednodemap.h
@@ -9,9 +9,9 @@
#define dom_core_namednodemap_h_
#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
struct dom_node;
-struct dom_string;
typedef struct dom_namednodemap dom_namednodemap;
@@ -22,7 +22,7 @@ dom_exception dom_namednodemap_get_length(struct dom_namednodemap *map,
unsigned long *length);
dom_exception _dom_namednodemap_get_named_item(struct dom_namednodemap *map,
- struct dom_string *name, struct dom_node **node);
+ dom_string *name, struct dom_node **node);
#define dom_namednodemap_get_named_item(m, n, r) \
_dom_namednodemap_get_named_item((dom_namednodemap *) (m), \
@@ -38,7 +38,7 @@ dom_exception _dom_namednodemap_set_named_item(struct dom_namednodemap *map,
dom_exception _dom_namednodemap_remove_named_item(
- struct dom_namednodemap *map, struct dom_string *name,
+ struct dom_namednodemap *map, dom_string *name,
struct dom_node **node);
#define dom_namednodemap_remove_named_item(m, n, r) \
@@ -55,8 +55,8 @@ dom_exception _dom_namednodemap_item(struct dom_namednodemap *map,
dom_exception _dom_namednodemap_get_named_item_ns(
- struct dom_namednodemap *map, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node);
+ struct dom_namednodemap *map, dom_string *namespace,
+ dom_string *localname, struct dom_node **node);
#define dom_namednodemap_get_named_item_ns(m, n, l, r) \
_dom_namednodemap_get_named_item_ns((dom_namednodemap *) (m), \
@@ -73,8 +73,8 @@ dom_exception _dom_namednodemap_set_named_item_ns(
dom_exception _dom_namednodemap_remove_named_item_ns(
- struct dom_namednodemap *map, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node);
+ struct dom_namednodemap *map, dom_string *namespace,
+ dom_string *localname, struct dom_node **node);
#define dom_namednodemap_remove_named_item_ns(m, n, l, r) \
_dom_namednodemap_remove_named_item_ns(\
diff --git a/include/dom/core/node.h b/include/dom/core/node.h
index 5e2d89a..ee1f057 100644
--- a/include/dom/core/node.h
+++ b/include/dom/core/node.h
@@ -12,11 +12,11 @@
#include <stdbool.h>
#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
struct dom_document;
struct dom_nodelist;
struct dom_namednodemap;
-struct dom_string;
struct dom_node;
/**
@@ -46,7 +46,7 @@ typedef enum {
* Type of handler function for user data registered on a DOM node
*/
typedef void (*dom_user_data_handler)(dom_node_operation operation,
- struct dom_string *key, void *data, struct dom_node *src,
+ dom_string *key, void *data, struct dom_node *src,
struct dom_node *dst);
/**
@@ -84,11 +84,11 @@ typedef struct dom_node_vtable {
/* The DOM level 3 node's oprations */
dom_exception (*dom_node_get_node_name)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_get_node_value)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_set_node_value)(dom_node_internal *node,
- struct dom_string *value);
+ dom_string *value);
dom_exception (*dom_node_get_node_type)(dom_node_internal *node,
dom_node_type *result);
dom_exception (*dom_node_get_parent_node)(dom_node_internal *node,
@@ -127,46 +127,46 @@ typedef struct dom_node_vtable {
dom_node_internal **result);
dom_exception (*dom_node_normalize)(dom_node_internal *node);
dom_exception (*dom_node_is_supported)(dom_node_internal *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
bool *result);
dom_exception (*dom_node_get_namespace)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_get_prefix)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_set_prefix)(dom_node_internal *node,
- struct dom_string *prefix);
+ dom_string *prefix);
dom_exception (*dom_node_get_local_name)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_has_attributes)(dom_node_internal *node,
bool *result);
dom_exception (*dom_node_get_base)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_compare_document_position)(
dom_node_internal *node, dom_node_internal *other,
uint16_t *result);
dom_exception (*dom_node_get_text_content)(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_node_set_text_content)(dom_node_internal *node,
- struct dom_string *content);
+ dom_string *content);
dom_exception (*dom_node_is_same)(dom_node_internal *node,
dom_node_internal *other, bool *result);
dom_exception (*dom_node_lookup_prefix)(dom_node_internal *node,
- struct dom_string *namespace,
- struct dom_string **result);
+ dom_string *namespace,
+ dom_string **result);
dom_exception (*dom_node_is_default_namespace)(dom_node_internal *node,
- struct dom_string *namespace, bool *result);
+ dom_string *namespace, bool *result);
dom_exception (*dom_node_lookup_namespace)(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result);
+ dom_string *prefix, dom_string **result);
dom_exception (*dom_node_is_equal)(dom_node_internal *node,
dom_node_internal *other, bool *result);
dom_exception (*dom_node_get_feature)(dom_node_internal *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
void **result);
dom_exception (*dom_node_set_user_data)(dom_node_internal *node,
- struct dom_string *key, void *data,
+ dom_string *key, void *data,
dom_user_data_handler handler, void **result);
dom_exception (*dom_node_get_user_data)(dom_node_internal *node,
- struct dom_string *key, void **result);
+ dom_string *key, void **result);
} dom_node_vtable;
/* The ref/unref methods define */
@@ -176,31 +176,31 @@ void _dom_node_unref(dom_node_internal *node);
#define dom_node_unref(n) _dom_node_unref((dom_node_internal *) (n))
static inline dom_exception dom_node_get_node_name(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_node_name(
(dom_node_internal *) node, result);
}
#define dom_node_get_node_name(n, r) dom_node_get_node_name((dom_node *) (n), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_node_get_node_value(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_node_value(
(dom_node_internal *) node, result);
}
#define dom_node_get_node_value(n, r) dom_node_get_node_value( \
- (dom_node *) (n), (struct dom_string **) (r))
+ (dom_node *) (n), (dom_string **) (r))
static inline dom_exception dom_node_set_node_value(struct dom_node *node,
- struct dom_string *value)
+ dom_string *value)
{
return ((dom_node_vtable *) node->vtable)->dom_node_set_node_value(
(dom_node_internal *) node, value);
}
#define dom_node_set_node_value(n, v) dom_node_set_node_value( \
- (dom_node *) (n), (struct dom_string *) (v))
+ (dom_node *) (n), (dom_string *) (v))
static inline dom_exception dom_node_get_node_type(struct dom_node *node,
dom_node_type *result)
@@ -368,7 +368,7 @@ static inline dom_exception dom_node_normalize(struct dom_node *node)
#define dom_node_normalize(n) dom_node_normalize((dom_node *) (n))
static inline dom_exception dom_node_is_supported(struct dom_node *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
bool *result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_is_supported(
@@ -376,44 +376,44 @@ static inline dom_exception dom_node_is_supported(struct dom_node *node,
version, result);
}
#define dom_node_is_supported(n, f, v, r) dom_node_is_supported( \
- (dom_node *) (n), (struct dom_string *) (f), \
- (struct dom_string *) (v), (bool *) (r))
+ (dom_node *) (n), (dom_string *) (f), \
+ (dom_string *) (v), (bool *) (r))
static inline dom_exception dom_node_get_namespace(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_namespace(
(dom_node_internal *) node, result);
}
#define dom_node_get_namespace(n, r) dom_node_get_namespace((dom_node *) (n), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_node_get_prefix(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_prefix(
(dom_node_internal *) node, result);
}
#define dom_node_get_prefix(n, r) dom_node_get_prefix((dom_node *) (n), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_node_set_prefix(struct dom_node *node,
- struct dom_string *prefix)
+ dom_string *prefix)
{
return ((dom_node_vtable *) node->vtable)->dom_node_set_prefix(
(dom_node_internal *) node, prefix);
}
#define dom_node_set_prefix(n, p) dom_node_set_prefix((dom_node *) (n), \
- (struct dom_string *) (p))
+ (dom_string *) (p))
static inline dom_exception dom_node_get_local_name(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_local_name(
(dom_node_internal *) node, result);
}
#define dom_node_get_local_name(n, r) dom_node_get_local_name((dom_node *) (n),\
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_node_has_attributes(struct dom_node *node,
bool *result)
@@ -425,13 +425,13 @@ static inline dom_exception dom_node_has_attributes(struct dom_node *node,
(dom_node *) (n), (bool *) (r))
static inline dom_exception dom_node_get_base(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_base(
(dom_node_internal *) node, result);
}
#define dom_node_get_base(n, r) dom_node_get_base((dom_node *) (n), \
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_node_compare_document_position(
struct dom_node *node, struct dom_node *other,
@@ -447,22 +447,22 @@ static inline dom_exception dom_node_compare_document_position(
(dom_node *) (o), (uint16_t *) (r))
static inline dom_exception dom_node_get_text_content(struct dom_node *node,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_text_content(
(dom_node_internal *) node, result);
}
#define dom_node_get_text_content(n, r) dom_node_get_text_content( \
- (dom_node *) (n), (struct dom_string **) (r))
+ (dom_node *) (n), (dom_string **) (r))
static inline dom_exception dom_node_set_text_content(struct dom_node *node,
- struct dom_string *content)
+ dom_string *content)
{
return ((dom_node_vtable *) node->vtable)->dom_node_set_text_content(
(dom_node_internal *) node, content);
}
#define dom_node_set_text_content(n, c) dom_node_get_text_content( \
- (dom_node *) (n), (struct dom_string *) (c))
+ (dom_node *) (n), (dom_string *) (c))
static inline dom_exception dom_node_is_same(struct dom_node *node,
struct dom_node *other, bool *result)
@@ -476,17 +476,17 @@ static inline dom_exception dom_node_is_same(struct dom_node *node,
(dom_node *) (o), (bool *) (r))
static inline dom_exception dom_node_lookup_prefix(struct dom_node *node,
- struct dom_string *namespace, struct dom_string **result)
+ dom_string *namespace, dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_lookup_prefix(
(dom_node_internal *) node, namespace, result);
}
#define dom_node_lookup_prefix(n, ns, r) dom_node_lookup_prefix( \
- (dom_node *) (n), (struct dom_string *) (ns), \
- (struct dom_string **) (r))
+ (dom_node *) (n), (dom_string *) (ns), \
+ (dom_string **) (r))
static inline dom_exception dom_node_is_default_namespace(
- struct dom_node *node, struct dom_string *namespace,
+ struct dom_node *node, dom_string *namespace,
bool *result)
{
return ((dom_node_vtable *) node->vtable)->
@@ -494,17 +494,17 @@ static inline dom_exception dom_node_is_default_namespace(
(dom_node_internal *) node, namespace, result);
}
#define dom_node_is_default_namespace(n, ns, r) dom_node_is_default_namespace(\
- (dom_node *) (n), (struct dom_string *) (ns), (bool *) (r))
+ (dom_node *) (n), (dom_string *) (ns), (bool *) (r))
static inline dom_exception dom_node_lookup_namespace(struct dom_node *node,
- struct dom_string *prefix, struct dom_string **result)
+ dom_string *prefix, dom_string **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_lookup_namespace(
(dom_node_internal *) node, prefix, result);
}
#define dom_node_lookup_namespace(n, p, r) dom_node_lookup_namespace( \
- (dom_node *) (n), (struct dom_string *) (p), \
- (struct dom_string **) (r))
+ (dom_node *) (n), (dom_string *) (p), \
+ (dom_string **) (r))
static inline dom_exception dom_node_is_equal(struct dom_node *node,
struct dom_node *other, bool *result)
@@ -518,18 +518,18 @@ static inline dom_exception dom_node_is_equal(struct dom_node *node,
(dom_node *) (o), (bool *) (r))
static inline dom_exception dom_node_get_feature(struct dom_node *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
void **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_feature(
(dom_node_internal *) node, feature, version, result);
}
#define dom_node_get_feature(n, f, v, r) dom_node_get_feature( \
- (dom_node *) (n), (struct dom_string *) (f), \
- (struct dom_string *) (v), (void **) (r))
+ (dom_node *) (n), (dom_string *) (f), \
+ (dom_string *) (v), (void **) (r))
static inline dom_exception dom_node_set_user_data(struct dom_node *node,
- struct dom_string *key, void *data,
+ dom_string *key, void *data,
dom_user_data_handler handler, void **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_set_user_data(
@@ -537,16 +537,16 @@ static inline dom_exception dom_node_set_user_data(struct dom_node *node,
result);
}
#define dom_node_set_user_data(n, k, d, h, r) dom_node_set_user_data( \
- (dom_node *) (n), (struct dom_string *) (k), (void *) (d), \
+ (dom_node *) (n), (dom_string *) (k), (void *) (d), \
(dom_user_data_handler) h, (void **) (r))
static inline dom_exception dom_node_get_user_data(struct dom_node *node,
- struct dom_string *key, void **result)
+ dom_string *key, void **result)
{
return ((dom_node_vtable *) node->vtable)->dom_node_get_user_data(
(dom_node_internal *) node, key, result);
}
#define dom_node_get_user_data(n, k, r) dom_node_get_user_data( \
- (dom_node *) (n), (struct dom_string *) (k), (void **) (r))
+ (dom_node *) (n), (dom_string *) (k), (void **) (r))
#endif
diff --git a/include/dom/core/string.h b/include/dom/core/string.h
index 7da2114..b671cb7 100644
--- a/include/dom/core/string.h
+++ b/include/dom/core/string.h
@@ -19,64 +19,64 @@
typedef struct dom_string dom_string;
/* Claim a reference on a DOM string */
-void dom_string_ref(struct dom_string *str);
+void dom_string_ref(dom_string *str);
/* Release a reference on a DOM string */
-void dom_string_unref(struct dom_string *str);
+void dom_string_unref(dom_string *str);
/* Create a DOM string from a string of characters */
dom_exception dom_string_create(dom_alloc alloc, void *pw,
- const uint8_t *ptr, size_t len, struct dom_string **str);
+ const uint8_t *ptr, size_t len, dom_string **str);
/* Clone a dom_string */
dom_exception dom_string_clone(dom_alloc alloc, void *pw,
- struct dom_string *str, struct dom_string **ret);
+ dom_string *str, dom_string **ret);
/* Get the internal lwc_string */
-dom_exception dom_string_get_intern(struct dom_string *str,
+dom_exception dom_string_get_intern(dom_string *str,
struct lwc_string_s **lwcstr);
/* Case sensitively compare two DOM strings */
-int dom_string_cmp(struct dom_string *s1, struct dom_string *s2);
+int dom_string_cmp(dom_string *s1, dom_string *s2);
/* Case insensitively compare two DOM strings */
-int dom_string_icmp(struct dom_string *s1, struct dom_string *s2);
+int dom_string_icmp(dom_string *s1, dom_string *s2);
/* Get the index of the first occurrence of a character in a dom string */
-uint32_t dom_string_index(struct dom_string *str, uint32_t chr);
+uint32_t dom_string_index(dom_string *str, uint32_t chr);
/* Get the index of the last occurrence of a character in a dom string */
-uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr);
+uint32_t dom_string_rindex(dom_string *str, uint32_t chr);
/* Get the length, in characters, of a dom string */
-uint32_t dom_string_length(struct dom_string *str);
+uint32_t dom_string_length(dom_string *str);
/* Get the UCS-4 character at position index, the index should be in
* [0, length), and length can be get by calling dom_string_length
*/
-dom_exception dom_string_at(struct dom_string *str, uint32_t index,
+dom_exception dom_string_at(dom_string *str, uint32_t index,
uint32_t *ch);
/* Concatenate two dom strings */
-dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2,
- struct dom_string **result);
+dom_exception dom_string_concat(dom_string *s1, dom_string *s2,
+ dom_string **result);
/* Extract a substring from a dom string */
-dom_exception dom_string_substr(struct dom_string *str,
- uint32_t i1, uint32_t i2, struct dom_string **result);
+dom_exception dom_string_substr(dom_string *str,
+ uint32_t i1, uint32_t i2, dom_string **result);
/* Insert data into a dom string at the given location */
-dom_exception dom_string_insert(struct dom_string *target,
- struct dom_string *source, uint32_t offset,
- struct dom_string **result);
+dom_exception dom_string_insert(dom_string *target,
+ dom_string *source, uint32_t offset,
+ dom_string **result);
/* Replace a section of a dom string */
-dom_exception dom_string_replace(struct dom_string *target,
- struct dom_string *source, uint32_t i1, uint32_t i2,
- struct dom_string **result);
+dom_exception dom_string_replace(dom_string *target,
+ dom_string *source, uint32_t i1, uint32_t i2,
+ dom_string **result);
/* Duplicate a dom string */
-dom_exception dom_string_dup(struct dom_string *str,
- struct dom_string **result);
+dom_exception dom_string_dup(dom_string *str,
+ dom_string **result);
/* Calculate a hash value from a dom string */
-uint32_t dom_string_hash(struct dom_string *str);
+uint32_t dom_string_hash(dom_string *str);
#endif
diff --git a/include/dom/core/text.h b/include/dom/core/text.h
index 5e38d13..61e1c4c 100644
--- a/include/dom/core/text.h
+++ b/include/dom/core/text.h
@@ -14,7 +14,6 @@
#include <dom/core/characterdata.h>
struct dom_characterdata;
-struct dom_string;
typedef struct dom_text dom_text;
@@ -26,9 +25,9 @@ typedef struct dom_text_vtable {
dom_exception (*dom_text_get_is_element_content_whitespace)(
struct dom_text *text, bool *result);
dom_exception (*dom_text_get_whole_text)(struct dom_text *text,
- struct dom_string **result);
+ dom_string **result);
dom_exception (*dom_text_replace_whole_text)(struct dom_text *text,
- struct dom_string *content, struct dom_text **result);
+ dom_string *content, struct dom_text **result);
} dom_text_vtable;
static inline dom_exception dom_text_split_text(struct dom_text *text,
@@ -52,21 +51,21 @@ static inline dom_exception dom_text_get_is_element_content_whitespace(
(bool *) (r))
static inline dom_exception dom_text_get_whole_text(struct dom_text *text,
- struct dom_string **result)
+ dom_string **result)
{
return ((dom_text_vtable *) ((dom_node *) text)->vtable)->
dom_text_get_whole_text(text, result);
}
#define dom_text_get_whole_text(t, r) dom_text_get_whole_text((dom_text *) (t),\
- (struct dom_string **) (r))
+ (dom_string **) (r))
static inline dom_exception dom_text_replace_whole_text(struct dom_text *text,
- struct dom_string *content, struct dom_text **result)
+ dom_string *content, struct dom_text **result)
{
return ((dom_text_vtable *) ((dom_node *) text)->vtable)->
dom_text_replace_whole_text(text, content, result);
}
#define dom_text_replace_whole_text(t, c, r) dom_text_replace_whole_text( \
- (dom_text *) (t), (struct dom_string *) (c), (dom_text **) (r))
+ (dom_text *) (t), (dom_string *) (c), (dom_text **) (r))
#endif
diff --git a/include/dom/core/typeinfo.h b/include/dom/core/typeinfo.h
index f285799..caa2094 100644
--- a/include/dom/core/typeinfo.h
+++ b/include/dom/core/typeinfo.h
@@ -11,8 +11,7 @@
#include <stdbool.h>
#include <dom/core/exceptions.h>
-
-struct dom_string;
+#include <dom/core/string.h>
typedef struct dom_type_info dom_type_info;
@@ -24,24 +23,24 @@ typedef enum {
} dom_type_info_derivation_method;
dom_exception _dom_type_info_get_type_name(dom_type_info *ti,
- struct dom_string **ret);
+ dom_string **ret);
#define dom_type_info_get_type_name(t, r) _dom_type_info_get_type_name( \
- (dom_type_info *) (t), (struct dom_string **) (r))
+ (dom_type_info *) (t), (dom_string **) (r))
dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti,
- struct dom_string **ret);
+ dom_string **ret);
#define dom_type_info_get_type_namespace(t, r) \
_dom_type_info_get_type_namespace((dom_type_info *) (t),\
- (struct dom_string **) (r))
+ (dom_string **) (r))
dom_exception _dom_type_info_is_derived(dom_type_info *ti,
- struct dom_string *namespace, struct dom_string *name,
+ dom_string *namespace, dom_string *name,
dom_type_info_derivation_method method, bool *ret);
#define dom_type_info_is_derived(t, s, n, m, r) _dom_type_info_is_derived(\
- (dom_type_info *) (t), (struct dom_string *) (s), \
- (struct dom_string *) (n), \
+ (dom_type_info *) (t), (dom_string *) (s), \
+ (dom_string *) (n), \
(dom_type_info_derivation_method) (m), (bool *) (r))