pidgin: cc24d17b: const-ify the xmlnode* parameter to xmln...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Fri Jul 9 22:15:46 EDT 2010
----------------------------------------------------------------------
Revision: cc24d17bab7569a77d933bbc370f107fcbec7aa6
Parent: 91a2dec0a67a66df303a6bd79ca02de1a76305df
Author: darkrain42 at pidgin.im
Date: 07/09/10 20:56:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cc24d17bab7569a77d933bbc370f107fcbec7aa6
Changelog:
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)
Changes against parent 91a2dec0a67a66df303a6bd79ca02de1a76305df
patched libpurple/xmlnode.c
patched libpurple/xmlnode.h
-------------- next part --------------
============================================================
--- libpurple/xmlnode.c 429717b4288ea43ffac689e5081bd55f7decf433
+++ libpurple/xmlnode.c 713ab433bfe9bdd2a3425d50d2e3321abdfd50c8
@@ -223,7 +223,7 @@ const char *
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 *
}
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);
============================================================
--- libpurple/xmlnode.h 40cb4d25125038154a0495839c914b97a32de5de
+++ libpurple/xmlnode.h 1662f69e937ac1d3b99d0d161d7f0b10fa7d4005
@@ -205,7 +205,7 @@ void xmlnode_set_attrib_full(xmlnode *no
*
* @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 @@ const char *xmlnode_get_attrib(xmlnode *
*
* @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.
More information about the Commits
mailing list