From 15d7074f55a2c3dd38ce9877626be6ec32b448d2 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 27 Jan 2009 00:04:59 +0100 Subject: fixes for python 2.6 by Moritz Venn --- lib/dvb/epgcache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/dvb/epgcache.cpp') diff --git a/lib/dvb/epgcache.cpp b/lib/dvb/epgcache.cpp index a8eca85b..fdcbe0e9 100644 --- a/lib/dvb/epgcache.cpp +++ b/lib/dvb/epgcache.cpp @@ -2058,7 +2058,11 @@ PyObject *eEPGCache::search(ePyObject arg) ePyObject obj = PyTuple_GET_ITEM(arg,0); if (PyString_Check(obj)) { +#if PY_VERSION_HEX < 0x02060000 argcount = PyString_GET_SIZE(obj); +#else + argcount = PyString_Size(obj); +#endif argstring = PyString_AS_STRING(obj); for (int i=0; i < argcount; ++i) switch(argstring[i]) @@ -2156,7 +2160,11 @@ PyObject *eEPGCache::search(ePyObject arg) { int casetype = PyLong_AsLong(PyTuple_GET_ITEM(arg, 4)); const char *str = PyString_AS_STRING(obj); +#if PY_VERSION_HEX < 0x02060000 int textlen = PyString_GET_SIZE(obj); +#else + int textlen = PyString_Size(obj); +#endif if (querytype == 1) eDebug("lookup for events with '%s' as title(%s)", str, casetype?"ignore case":"case sensitive"); else -- cgit v1.2.3