mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
xmlinterface use const char instand char
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
|
||||
unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, const int base)
|
||||
{
|
||||
char *ptr = xmlGetAttribute(node, name);
|
||||
const char *ptr = xmlGetAttribute(node, name);
|
||||
|
||||
if (!ptr)
|
||||
return 0;
|
||||
@@ -57,7 +57,7 @@ unsigned long xmlGetNumericAttribute(const xmlNodePtr node, const char *name, co
|
||||
|
||||
long xmlGetSignedNumericAttribute(const xmlNodePtr node, const char *name, const int base)
|
||||
{
|
||||
char *ptr = xmlGetAttribute(node, name);
|
||||
const char *ptr = xmlGetAttribute(node, name);
|
||||
|
||||
if (!ptr)
|
||||
return 0;
|
||||
|
@@ -41,8 +41,8 @@
|
||||
#ifdef USE_LIBXML
|
||||
#include <libxml/parser.h>
|
||||
#define xmlNextNode next
|
||||
inline char* xmlGetAttribute (xmlNodePtr cur, const char * s) { return (char *)xmlGetProp(cur, (const xmlChar *)s); };
|
||||
inline char* xmlGetName (xmlNodePtr cur) { return (char *)(cur->name); };
|
||||
inline const char* xmlGetAttribute (xmlNodePtr cur, const char * s) { return (const char *)xmlGetProp(cur, (const xmlChar *)s); };
|
||||
inline const char* xmlGetName (xmlNodePtr cur) { return (const char *)(cur->name); };
|
||||
|
||||
#else /* use libxmltree */
|
||||
#include "xmltree.h"
|
||||
@@ -52,9 +52,9 @@ typedef XMLTreeNode* xmlNodePtr;
|
||||
#define xmlNextNode GetNext()
|
||||
inline xmlNodePtr xmlDocGetRootElement(xmlDocPtr doc) { return doc->RootNode(); }
|
||||
inline void xmlFreeDoc (xmlDocPtr doc) { delete doc; }
|
||||
inline char* xmlGetAttribute (xmlNodePtr cur, const char *s) { return cur->GetAttributeValue(s); }
|
||||
inline char* xmlGetName (xmlNodePtr cur) { return cur->GetType(); }
|
||||
inline char* xmlGetData (xmlNodePtr cur) { return cur->GetData(); }
|
||||
inline const char* xmlGetAttribute (xmlNodePtr cur, const char *s) { return cur->GetAttributeValue(s); }
|
||||
inline const char* xmlGetName (xmlNodePtr cur) { return cur->GetType(); }
|
||||
inline const char* xmlGetData (xmlNodePtr cur) { return cur->GetData(); }
|
||||
#endif /* USE_LIBXML */
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user