From: <the...@us...> - 2006-12-11 19:44:41
|
Revision: 17963 http://svn.sourceforge.net/gaim/?rev=17963&view=rev Author: thekingant Date: 2006-12-11 11:44:35 -0800 (Mon, 11 Dec 2006) Log Message: ----------- Rename namespace to xmlns because namespace is a reserved word in C++ Modified Paths: -------------- trunk/libgaim/xmlnode.c trunk/libgaim/xmlnode.h Modified: trunk/libgaim/xmlnode.c =================================================================== --- trunk/libgaim/xmlnode.c 2006-12-11 19:32:52 UTC (rev 17962) +++ trunk/libgaim/xmlnode.c 2006-12-11 19:44:35 UTC (rev 17963) @@ -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; Modified: trunk/libgaim/xmlnode.h =================================================================== --- trunk/libgaim/xmlnode.h 2006-12-11 19:32:52 UTC (rev 17962) +++ trunk/libgaim/xmlnode.h 2006-12-11 19:44:35 UTC (rev 17963) @@ -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. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |