better handling for time_t .. use typedef
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 13 Nov 2005 14:39:27 +0000 (14:39 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 13 Nov 2005 14:39:27 +0000 (14:39 +0000)
lib/dvb/epgcache.h
lib/python/enigma_python.i
lib/service/event.h

index aa0410b..01d738c 100644 (file)
@@ -237,7 +237,7 @@ public:
        // eventData's are plain entrys out of the cache.. it's not safe to use them after cache unlock
        // but its faster in use... its not allowed to delete this pointers via delete or free..
        RESULT lookupEvent(const eServiceReference &service, int event_id, const eventData *&);
-       RESULT lookupEvent(const eServiceReference &service, time_t , const eventData *&);
+       RESULT lookupEvent(const eServiceReference &service, time_t, const eventData *&);
        RESULT getNextTimeEntry(const eventData *&);
 
 #ifndef SWIG
index 7aa9081..7764f8c 100644 (file)
@@ -113,6 +113,7 @@ extern PSignal1<void,int> &keyPressedSignal();
 
 
 #define DEBUG
+typedef long time_t;
 %include "typemaps.i"
 %include "stl.i"
 %include <lib/python/swig.h>
index cbce6f1..7e6cf5d 100644 (file)
@@ -2,13 +2,12 @@
 #define __lib_service_event_h
 
 #ifndef PYTHON
-
 #include <time.h>
 #include <lib/base/object.h>
 #include <string>
 class Event;
-
 #endif
+
 class eServiceEvent: public iObject
 {
 DECLARE_REF(eServiceEvent);
@@ -21,7 +20,7 @@ public:
        bool loadLanguage(Event *event, std::string lang);
        RESULT parseFrom(Event *evt);
 #endif
-       long getBeginTime() { return (long)m_begin; }
+       time_t getBeginTime() { return m_begin; }
        int getDuration() { return m_duration; }
        std::string getEventName() { return m_event_name; }
        std::string getShortDescription() { return m_short_description; }