Mercurial > pidgin
diff libpurple/xmlnode.c @ 25414:efde7e6ed5f2
There's no reason for these to not be const is there? This doesn't
break API compatibility in my mind. Does anyone think it does?
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 03 Feb 2009 18:56:17 +0000 |
| parents | 667b8ae0fcee |
| children | f424f26dd329 4b8c4870b13a af42303654a5 |
line wrap: on
line diff
--- a/libpurple/xmlnode.c Tue Feb 03 18:53:04 2009 +0000 +++ b/libpurple/xmlnode.c Tue Feb 03 18:56:17 2009 +0000 @@ -303,7 +303,7 @@ node->prefix = g_strdup(prefix); } -const char *xmlnode_get_prefix(xmlnode *node) +const char *xmlnode_get_prefix(const xmlnode *node) { g_return_val_if_fail(node != NULL, NULL); return node->prefix; @@ -443,11 +443,11 @@ } static char * -xmlnode_to_str_helper(xmlnode *node, int *len, gboolean formatting, int depth) +xmlnode_to_str_helper(const xmlnode *node, int *len, gboolean formatting, int depth) { GString *text = g_string_new(""); const char *prefix; - xmlnode *c; + const xmlnode *c; char *node_name, *esc, *esc2, *tab = NULL; gboolean need_end = FALSE, pretty = formatting; @@ -537,13 +537,13 @@ } char * -xmlnode_to_str(xmlnode *node, int *len) +xmlnode_to_str(const xmlnode *node, int *len) { return xmlnode_to_str_helper(node, len, FALSE, 0); } char * -xmlnode_to_formatted_str(xmlnode *node, int *len) +xmlnode_to_formatted_str(const xmlnode *node, int *len) { char *xml, *xml_with_declaration;
