summaryrefslogtreecommitdiff
path: root/xml/type.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2005-01-05 19:32:43 +0000
committerlordjaxom <lordjaxom>2005-01-05 19:32:43 +0000
commit43f57cb99f43a91285ef5df6bd36b3bda5dd719a (patch)
tree606490e3b1ba0186e82e7f3e7c23b6c99b29650b /xml/type.c
parent180e1063acbb8cedbd4831d7070429dc6d429457 (diff)
downloadvdr-plugin-text2skin-43f57cb99f43a91285ef5df6bd36b3bda5dd719a.tar.gz
vdr-plugin-text2skin-43f57cb99f43a91285ef5df6bd36b3bda5dd719a.tar.bz2
- extended consequent use of cxType for strings and numbers in
function/string context
Diffstat (limited to 'xml/type.c')
-rw-r--r--xml/type.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/xml/type.c b/xml/type.c
index 90d1487..5fa950c 100644
--- a/xml/type.c
+++ b/xml/type.c
@@ -1,15 +1,21 @@
/*
- * $Id: type.c,v 1.1 2004/12/19 22:03:28 lordjaxom Exp $
+ * $Id: type.c,v 1.2 2005/01/05 19:32:43 lordjaxom Exp $
*/
#include "xml/type.h"
#include "xml/function.h"
+#include <vdr/tools.h>
#include <stdio.h>
cxType cxType::False(false);
cxType cxType::True(true);
-const std::string &cxType::String(void) {
+std::string cxType::String(void) const {
+ if (mType == number)
+ return (const char*)itoa(mNumber);
+ return mString;
+
+#if 0
if (mType == number) {
char *buffer;
asprintf(&buffer, "%d", mNumber);
@@ -21,4 +27,5 @@ const std::string &cxType::String(void) {
mType = string;
}
return mString;
+#endif
}