Mercurial > pidgin.yaz
changeset 10848:98de05966d6d
[gaim-migrate @ 12520]
size_t is unsigned, so -1 is technically bad
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 19 Apr 2005 04:06:57 +0000 |
parents | a3ce85181220 |
children | c203cd637f95 |
files | src/xmlnode.c src/xmlnode.h |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xmlnode.c Tue Apr 19 04:05:55 2005 +0000 +++ b/src/xmlnode.c Tue Apr 19 04:06:57 2005 +0000 @@ -87,10 +87,10 @@ } void -xmlnode_insert_data(xmlnode *node, const char *data, size_t size) +xmlnode_insert_data(xmlnode *node, const char *data, gssize size) { xmlnode *child; - size_t real_size; + gsize real_size; g_return_if_fail(node != NULL); g_return_if_fail(data != NULL); @@ -403,12 +403,12 @@ xmlnode * -xmlnode_from_str(const char *str, size_t size) +xmlnode_from_str(const char *str, gssize size) { struct _xmlnode_parser_data *xpd = g_new0(struct _xmlnode_parser_data, 1); xmlnode *ret; GMarkupParseContext *context; - size_t real_size = size == -1 ? strlen(str) : size; + gsize real_size = size == -1 ? strlen(str) : size; context = g_markup_parse_context_new(&xmlnode_parser, 0, xpd, NULL);
--- a/src/xmlnode.h Tue Apr 19 04:05:55 2005 +0000 +++ b/src/xmlnode.h Tue Apr 19 04:06:57 2005 +0000 @@ -114,7 +114,7 @@ * @param size The size of the data to insert. If data is * null-terminated you can pass in -1. */ -void xmlnode_insert_data(xmlnode *node, const char *data, size_t size); +void xmlnode_insert_data(xmlnode *node, const char *data, gssize size); /** * Gets data from a node. @@ -185,7 +185,7 @@ * * @return The new node. */ -xmlnode *xmlnode_from_str(const char *str, size_t size); +xmlnode *xmlnode_from_str(const char *str, gssize size); /** * Creates a new node from the source node.