changeset 15176:50f263712df1

[gaim-migrate @ 17963] Rename namespace to xmlns because namespace is a reserved word in C++ committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 11 Dec 2006 19:44:35 +0000
parents bbeb1dfcb25b
children 5a7648191611
files libgaim/xmlnode.c libgaim/xmlnode.h
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/xmlnode.c	Mon Dec 11 17:48:40 2006 +0000
+++ b/libgaim/xmlnode.c	Mon Dec 11 19:44:35 2006 +0000
@@ -181,15 +181,15 @@
 {
 	g_return_if_fail(node != NULL);
 
-	g_free(node->namespace);
-	node->namespace = g_strdup(xmlns);
+	g_free(node->xmlns);
+	node->xmlns = g_strdup(xmlns);
 }
 
 const char *xmlnode_get_namespace(xmlnode *node)
 {
 	g_return_val_if_fail(node != NULL, NULL);
 
-	return node->namespace;
+	return node->xmlns;
 }
 
 void
@@ -208,7 +208,7 @@
 
 	g_free(node->name);
 	g_free(node->data);
-	g_free(node->namespace);
+	g_free(node->xmlns);
 
 	GAIM_DBUS_UNREGISTER_POINTER(node);
 	g_free(node);
@@ -293,12 +293,12 @@
 	node_name = g_markup_escape_text(node->name, -1);
 	g_string_append_printf(text, "<%s", node_name);
 
-	if (node->namespace) {
-		if(!node->parent || !node->parent->namespace || strcmp(node->namespace, node->parent->namespace))
+	if (node->xmlns) {
+		if(!node->parent || !node->parent->xmlns || strcmp(node->xmlns, node->parent->xmlns))
 		{
-			char *namespace = g_markup_escape_text(node->namespace, -1);
-			g_string_append_printf(text, " xmlns='%s'", namespace);
-			g_free(namespace);
+			char *xmlns = g_markup_escape_text(node->xmlns, -1);
+			g_string_append_printf(text, " xmlns='%s'", xmlns);
+			g_free(xmlns);
 		}
 	}
 	for(c = node->child; c; c = c->next)
@@ -377,7 +377,7 @@
 
 static void
 xmlnode_parser_element_start_libxml(void *user_data,
-				   const xmlChar *element_name, const xmlChar *prefix, const xmlChar *namespace,
+				   const xmlChar *element_name, const xmlChar *prefix, const xmlChar *xmlns,
 				   int nb_namespaces, const xmlChar **namespaces,
 				   int nb_attributes, int nb_defaulted, const xmlChar **attributes)
 {
@@ -393,7 +393,7 @@
 		else
 			node = xmlnode_new((const char *) element_name);
 
-		xmlnode_set_namespace(node, (const char *) namespace);
+		xmlnode_set_namespace(node, (const char *) xmlns);
 
 		for(i=0; i < nb_attributes * 5; i+=5) {
 			char *txt;
@@ -414,7 +414,7 @@
 
 static void
 xmlnode_parser_element_end_libxml(void *user_data, const xmlChar *element_name,
-				 const xmlChar *prefix, const xmlChar *namespace)
+				 const xmlChar *prefix, const xmlChar *xmlns)
 {
 	struct _xmlnode_parser_data *xpd = user_data;
 
--- a/libgaim/xmlnode.h	Mon Dec 11 17:48:40 2006 +0000
+++ b/libgaim/xmlnode.h	Mon Dec 11 19:44:35 2006 +0000
@@ -46,7 +46,7 @@
 struct _xmlnode
 {
 	char *name;			/**< The name of the node. */
-	char *namespace;		/**< The namespace of the node */
+	char *xmlns;		/**< The namespace of the node */
 	XMLNodeType type;		/**< The type of the node. */
 	char *data;			/**< The data for the node. */
 	size_t data_sz;			/**< The size of the data. */