diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/attr.c | 8 | ||||
-rw-r--r-- | src/core/characterdata.c | 20 | ||||
-rw-r--r-- | src/core/characterdata.h | 12 | ||||
-rw-r--r-- | src/core/element.c | 8 | ||||
-rw-r--r-- | src/core/implementation.c | 2 | ||||
-rw-r--r-- | src/core/namednodemap.c | 4 | ||||
-rw-r--r-- | src/core/namednodemap.h | 4 | ||||
-rw-r--r-- | src/core/nodelist.c | 8 | ||||
-rw-r--r-- | src/core/text.c | 4 | ||||
-rw-r--r-- | src/core/text.h | 2 |
10 files changed, 36 insertions, 36 deletions
diff --git a/src/core/attr.c b/src/core/attr.c index 9db04b6..d9e2b07 100644 --- a/src/core/attr.c +++ b/src/core/attr.c @@ -36,7 +36,7 @@ struct dom_attr { dom_attr_type type; /**< The type of this attribute */ union { - unsigned long lvalue; + uint32_t lvalue; unsigned short svalue; bool bvalue; } value; /**< The special type value of this attribute */ @@ -204,7 +204,7 @@ dom_attr_type dom_attr_get_type(dom_attr *a) * DOM_ATTR_WRONG_TYPE_ERR if the attribute node is not a integer * attribute */ -dom_exception dom_attr_get_integer(dom_attr *a, unsigned long *value) +dom_exception dom_attr_get_integer(dom_attr *a, uint32_t *value) { if (a->type != DOM_ATTR_INTEGER) return DOM_ATTR_WRONG_TYPE_ERR; @@ -223,7 +223,7 @@ dom_exception dom_attr_get_integer(dom_attr *a, unsigned long *value) * DOM_ATTR_WRONG_TYPE_ERR if the attribute node is not a integer * attribute */ -dom_exception dom_attr_set_integer(dom_attr *a, unsigned long value) +dom_exception dom_attr_set_integer(dom_attr *a, uint32_t value) { struct dom_document *doc; struct dom_node_internal *ele; @@ -507,7 +507,7 @@ dom_exception _dom_attr_get_value(struct dom_attr *attr, return err; } - /* No longer need textual representation */ + /* No int32_ter need textual representation */ dom_string_unref(tr); /* Finished with previous value */ diff --git a/src/core/characterdata.c b/src/core/characterdata.c index 0883444..c46a5c6 100644 --- a/src/core/characterdata.c +++ b/src/core/characterdata.c @@ -159,7 +159,7 @@ dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata, * \return DOM_NO_ERR. */ dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata, - unsigned long *length) + uint32_t *length) { struct dom_node_internal *c = (struct dom_node_internal *) cdata; @@ -192,13 +192,13 @@ dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata, * this implementation; dom_strings are unbounded. */ dom_exception _dom_characterdata_substring_data( - struct dom_characterdata *cdata, unsigned long offset, - unsigned long count, dom_string **data) + struct dom_characterdata *cdata, uint32_t offset, + uint32_t count, dom_string **data) { struct dom_node_internal *c = (struct dom_node_internal *) cdata; uint32_t len, end; - if ((signed long) offset < 0 || (signed long) count < 0) { + if ((int32_t) offset < 0 || (int32_t) count < 0) { return DOM_INDEX_SIZE_ERR; } @@ -273,7 +273,7 @@ dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata, * DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly. */ dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata, - unsigned long offset, dom_string *data) + uint32_t offset, dom_string *data) { struct dom_node_internal *c = (struct dom_node_internal *) cdata; dom_string *temp; @@ -286,7 +286,7 @@ dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata, return DOM_NO_MODIFICATION_ALLOWED_ERR; } - if ((signed long) offset < 0) { + if ((int32_t) offset < 0) { return DOM_INDEX_SIZE_ERR; } @@ -335,7 +335,7 @@ dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata, * DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly. */ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata, - unsigned long offset, unsigned long count) + uint32_t offset, uint32_t count) { struct dom_node_internal *c = (struct dom_node_internal *) cdata; dom_string *temp; @@ -349,7 +349,7 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata, return DOM_NO_MODIFICATION_ALLOWED_ERR; } - if ((signed long) offset < 0 || (signed long) count < 0) { + if ((int32_t) offset < 0 || (int32_t) count < 0) { return DOM_INDEX_SIZE_ERR; } @@ -404,7 +404,7 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata, * DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly. */ dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata, - unsigned long offset, unsigned long count, + uint32_t offset, uint32_t count, dom_string *data) { struct dom_node_internal *c = (struct dom_node_internal *) cdata; @@ -418,7 +418,7 @@ dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata, return DOM_NO_MODIFICATION_ALLOWED_ERR; } - if ((signed long) offset < 0 || (signed long) count < 0) { + if ((int32_t) offset < 0 || (int32_t) count < 0) { return DOM_INDEX_SIZE_ERR; } diff --git a/src/core/characterdata.h b/src/core/characterdata.h index 23be9c9..0b0889c 100644 --- a/src/core/characterdata.h +++ b/src/core/characterdata.h @@ -34,18 +34,18 @@ dom_exception _dom_characterdata_get_data(struct dom_characterdata *cdata, dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata, dom_string *data); dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata, - unsigned long *length); + uint32_t *length); dom_exception _dom_characterdata_substring_data( - struct dom_characterdata *cdata, unsigned long offset, - unsigned long count, dom_string **data); + struct dom_characterdata *cdata, uint32_t offset, + uint32_t count, dom_string **data); dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata, dom_string *data); dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata, - unsigned long offset, dom_string *data); + uint32_t offset, dom_string *data); dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata, - unsigned long offset, unsigned long count); + uint32_t offset, uint32_t count); dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata, - unsigned long offset, unsigned long count, + uint32_t offset, uint32_t count, dom_string *data); dom_exception _dom_characterdata_get_text_content( dom_node_internal *node, diff --git a/src/core/element.c b/src/core/element.c index 8908968..cbdb6e1 100644 --- a/src/core/element.c +++ b/src/core/element.c @@ -485,7 +485,7 @@ static dom_exception _dom_element_set_id_attr(struct dom_element *element, /* The operation set for namednodemap */ static dom_exception attributes_get_length(void *priv, - unsigned long *length); + uint32_t *length); static dom_exception attributes_get_named_item(void *priv, dom_string *name, struct dom_node **node); static dom_exception attributes_set_named_item(void *priv, @@ -494,7 +494,7 @@ static dom_exception attributes_remove_named_item( void *priv, dom_string *name, struct dom_node **node); static dom_exception attributes_item(void *priv, - unsigned long index, struct dom_node **node); + uint32_t index, struct dom_node **node); static dom_exception attributes_get_named_item_ns( void *priv, dom_string *namespace, dom_string *localname, struct dom_node **node); @@ -2226,7 +2226,7 @@ dom_exception _dom_element_get_id(struct dom_element *ele, dom_string **id) /* Implementation function for NamedNodeMap, see core/namednodemap.h for * details */ -dom_exception attributes_get_length(void *priv, unsigned long *length) +dom_exception attributes_get_length(void *priv, uint32_t *length) { dom_element *e = (dom_element *) priv; @@ -2283,7 +2283,7 @@ dom_exception attributes_remove_named_item( /* Implementation function for NamedNodeMap, see core/namednodemap.h for * details */ dom_exception attributes_item(void *priv, - unsigned long index, struct dom_node **node) + uint32_t index, struct dom_node **node) { dom_attr_list * match = NULL; unsigned int num = index + 1; diff --git a/src/core/implementation.c b/src/core/implementation.c index 26908f2..6041c22 100644 --- a/src/core/implementation.c +++ b/src/core/implementation.c @@ -266,7 +266,7 @@ dom_exception dom_implementation_create_document( return err; } - /* No longer interested in inserted node */ + /* No int32_ter interested in inserted node */ dom_node_unref(inserted); /* Done with element */ diff --git a/src/core/namednodemap.c b/src/core/namednodemap.c index f68cd3b..ada7e90 100644 --- a/src/core/namednodemap.c +++ b/src/core/namednodemap.c @@ -117,7 +117,7 @@ void dom_namednodemap_unref(dom_namednodemap *map) * \return DOM_NO_ERR. */ dom_exception dom_namednodemap_get_length(dom_namednodemap *map, - unsigned long *length) + uint32_t *length) { assert(map->opt != NULL); return map->opt->namednodemap_get_length(map->priv, length); @@ -209,7 +209,7 @@ dom_exception _dom_namednodemap_remove_named_item( * should unref the node once it has finished with it. */ dom_exception _dom_namednodemap_item(dom_namednodemap *map, - unsigned long index, dom_node **node) + uint32_t index, dom_node **node) { assert(map->opt != NULL); return map->opt->namednodemap_item(map->priv, index, node); diff --git a/src/core/namednodemap.h b/src/core/namednodemap.h index 079294c..62e5858 100644 --- a/src/core/namednodemap.h +++ b/src/core/namednodemap.h @@ -19,7 +19,7 @@ struct dom_namednodemap; struct nnm_operation { dom_exception (*namednodemap_get_length)(void *priv, - unsigned long *length); + uint32_t *length); dom_exception (*namednodemap_get_named_item)(void *priv, dom_string *name, struct dom_node **node); @@ -32,7 +32,7 @@ struct nnm_operation { struct dom_node **node); dom_exception (*namednodemap_item)(void *priv, - unsigned long index, struct dom_node **node); + uint32_t index, struct dom_node **node); dom_exception (*namednodemap_get_named_item_ns)( void *priv, dom_string *namespace, diff --git a/src/core/nodelist.c b/src/core/nodelist.c index 8ce9475..e2a1435 100644 --- a/src/core/nodelist.c +++ b/src/core/nodelist.c @@ -196,10 +196,10 @@ void dom_nodelist_unref(dom_nodelist *list) * \param length Pointer to location to receive length * \return DOM_NO_ERR. */ -dom_exception dom_nodelist_get_length(dom_nodelist *list, unsigned long *length) +dom_exception dom_nodelist_get_length(dom_nodelist *list, uint32_t *length) { dom_node_internal *cur = list->root->first_child; - unsigned long len = 0; + uint32_t len = 0; /* Traverse data structure */ while (cur != NULL) { @@ -300,10 +300,10 @@ dom_exception dom_nodelist_get_length(dom_nodelist *list, unsigned long *length) * should unref the node once it has finished with it. */ dom_exception _dom_nodelist_item(dom_nodelist *list, - unsigned long index, dom_node **node) + uint32_t index, dom_node **node) { dom_node_internal *cur = list->root->first_child; - unsigned long count = 0; + uint32_t count = 0; /* Traverse data structure */ while (cur != NULL) { diff --git a/src/core/text.c b/src/core/text.c index 532ee13..94718a2 100644 --- a/src/core/text.c +++ b/src/core/text.c @@ -178,12 +178,12 @@ void _dom_text_finalise(dom_text *text) * once it has finished with it. */ dom_exception _dom_text_split_text(dom_text *text, - unsigned long offset, dom_text **result) + uint32_t offset, dom_text **result) { dom_node_internal *t = (dom_node_internal *) text; dom_string *value; dom_text *res; - unsigned long len; + uint32_t len; dom_exception err; if (_dom_node_readonly(t)) { diff --git a/src/core/text.h b/src/core/text.h index 1cc5b1e..26424ce 100644 --- a/src/core/text.h +++ b/src/core/text.h @@ -43,7 +43,7 @@ void _dom_text_finalise(dom_text *text); /* Virtual functions for dom_text */ dom_exception _dom_text_split_text(dom_text *text, - unsigned long offset, dom_text **result); + uint32_t offset, dom_text **result); dom_exception _dom_text_get_is_element_content_whitespace( dom_text *text, bool *result); dom_exception _dom_text_get_whole_text(dom_text *text, |