Mercurial > pidgin
changeset 30257:77cd42f08ba1
const-ify the xmlnode* parameter to xmlnode_get_attrib(_with_namespace)
This doesn't break A[BP]I, right? It seems sane to me and is needed
for my next commit (using const xmlnode*s)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 10 Jul 2010 00:56:11 +0000 |
parents | 067ad74c7523 |
children | 7fb775b4465b |
files | libpurple/xmlnode.c libpurple/xmlnode.h |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/xmlnode.c Sat Jul 10 00:35:52 2010 +0000 +++ b/libpurple/xmlnode.c Sat Jul 10 00:56:11 2010 +0000 @@ -223,7 +223,7 @@ const char * -xmlnode_get_attrib(xmlnode *node, const char *attr) +xmlnode_get_attrib(const xmlnode *node, const char *attr) { xmlnode *x; @@ -240,9 +240,9 @@ } const char * -xmlnode_get_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns) +xmlnode_get_attrib_with_namespace(const xmlnode *node, const char *attr, const char *xmlns) { - xmlnode *x; + const xmlnode *x; g_return_val_if_fail(node != NULL, NULL); g_return_val_if_fail(attr != NULL, NULL);
--- a/libpurple/xmlnode.h Sat Jul 10 00:35:52 2010 +0000 +++ b/libpurple/xmlnode.h Sat Jul 10 00:56:11 2010 +0000 @@ -205,7 +205,7 @@ * * @return The value of the attribute. */ -const char *xmlnode_get_attrib(xmlnode *node, const char *attr); +const char *xmlnode_get_attrib(const xmlnode *node, const char *attr); /** * Gets a namespaced attribute from a node @@ -216,7 +216,7 @@ * * @return The value of the attribute/ */ -const char *xmlnode_get_attrib_with_namespace(xmlnode *node, const char *attr, const char *xmlns); +const char *xmlnode_get_attrib_with_namespace(const xmlnode *node, const char *attr, const char *xmlns); /** * Removes an attribute from a node.