summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-12-15 11:18:41 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-12-15 11:18:41 +0100
commit2844daafcf5740e62960a54f19009dd1eb44b5c2 (patch)
treee6661cefd5a667a2b93c498dd27a33dc3635fc9c /common
parentef6e4d43896c117fc2148f184a1fa10e2f64fd59 (diff)
downloadeurephia-2844daafcf5740e62960a54f19009dd1eb44b5c2.tar.gz
eurephia-2844daafcf5740e62960a54f19009dd1eb44b5c2.tar.xz
eurephia-2844daafcf5740e62960a54f19009dd1eb44b5c2.zip
Needed to change from #define macro to function to avoid compiler warning
When xmlExtractContent() was used together with the defaultValue() macro, a compiler warning appeared. Changed the xmlExtractContent() macro to a inline function, hopefully the overhead will be minimal with this change.
Diffstat (limited to 'common')
-rw-r--r--common/eurephia_xml.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/eurephia_xml.h b/common/eurephia_xml.h
index c955653..761ffda 100644
--- a/common/eurephia_xml.h
+++ b/common/eurephia_xml.h
@@ -27,7 +27,9 @@
char *xmlGetAttrValue(xmlAttr *properties, const char *key);
xmlNode *xmlFindNode(xmlNode *node, const char *key);
-#define xmlExtractContent(n) (char*) (((n != NULL) && (n->children != NULL)) ? n->children->content : NULL)
+inline char *xmlExtractContent(xmlNode *n) {
+ return (char *) (((n != NULL) && (n->children != NULL)) ? n->children->content : NULL);
+}
inline char *xmlGetNodeContent(xmlNode *node, const char *key) {
return xmlExtractContent(xmlFindNode(node, key));
}