aboutsummaryrefslogtreecommitdiff
path: root/lib/python/python.h
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-12-14 17:07:42 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-12-14 17:07:42 +0000
commit55c2a88ecd94a2eb6aa00f1227912fcd2659932b (patch)
tree785306edb681cfa959940892003b3ebf408be9f8 /lib/python/python.h
parentacf619a3c304992a7ec093cd95fdd6c0805cca66 (diff)
downloadenigma2-55c2a88ecd94a2eb6aa00f1227912fcd2659932b.tar.gz
enigma2-55c2a88ecd94a2eb6aa00f1227912fcd2659932b.zip
add possibility to get a dict with transponderdata for servicerefs
Diffstat (limited to 'lib/python/python.h')
-rw-r--r--lib/python/python.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/python/python.h b/lib/python/python.h
index 42749c7e..d0fe92a8 100644
--- a/lib/python/python.h
+++ b/lib/python/python.h
@@ -204,6 +204,15 @@ inline ePyObject Impl_PyString_FromString(const char* file, int line, const char
return ePyObject(PyString_FromString(str), file, line);
}
+inline ePyObject Impl_PyString_FromFormat(const char* file, int line, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ PyObject *ob = PyString_FromFormatV(fmt, ap);
+ va_end(ap);
+ return ePyObject(ob, file, line);
+}
+
inline ePyObject Impl_PyInt_FromLong(const char* file, int line, long val)
{
return ePyObject(PyInt_FromLong(val), file, line);
@@ -281,6 +290,15 @@ inline ePyObject Impl_PyString_FromString(const char *str)
return PyString_FromString(str);
}
+inline ePyObject Impl_PyString_FromFormat(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ PyObject *ob = PyString_FromFormatV(fmt, ap);
+ va_end(ap);
+ return ePyObject(ob);
+}
+
inline ePyObject Impl_PyInt_FromLong(long val)
{
return PyInt_FromLong(val);
@@ -337,6 +355,7 @@ inline void Impl_DECREF(PyObject *ob)
#define PyTuple_New(args...) Impl_PyTuple_New(__FILE__, __LINE__, args)
#define PyDict_New(...) Impl_PyDict_New(__FILE__, __LINE__)
#define PyString_FromString(str) Impl_PyString_FromString(__FILE__, __LINE__, str)
+#define PyString_FromFormat(str, args...) Impl_PyString_FromFormat(__FILE__, __LINE__, str, args)
#define PyInt_FromLong(val) Impl_PyInt_FromLong(__FILE__, __LINE__, val)
#define PyLong_FromLong(val) Impl_PyLong_FromLong(__FILE__, __LINE__, val)
#define PyLong_FromUnsignedLong(val) Impl_PyLong_FromUnsignedLong(__FILE__, __LINE__, val)
@@ -353,6 +372,7 @@ inline void Impl_DECREF(PyObject *ob)
#define PyTuple_New(args...) Impl_PyTuple_New(args)
#define PyDict_New(...) Impl_PyDict_New()
#define PyString_FromString(str) Impl_PyString_FromString(str)
+#define PyString_FromFormat(str, args...) Impl_PyString_FromFormat(str, args)
#define PyInt_FromLong(val) Impl_PyInt_FromLong(val)
#define PyLong_FromLong(val) Impl_PyLong_FromLong(val)
#define PyLong_FromUnsignedLong(val) Impl_PyLong_FromUnsignedLong(val)