[vlc-commits] commit: Callback methods take a pointer to Event (Denis Charmet )

git at videolan.org git at videolan.org
Tue Apr 20 15:30:38 CEST 2010


vlc/python | branch: master | Denis Charmet <typx at dinauz.org> | Tue Apr 20 15:29:43 2010 +0200| [6620f2f3d8c0b66df4f3a1ae638437abe97d392f] | committer: Olivier Aubert 

Callback methods take a pointer to Event
Signed-off-by: Olivier Aubert <olivier.aubert at liris.cnrs.fr>

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=6620f2f3d8c0b66df4f3a1ae638437abe97d392f
---

 footer.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/footer.py b/footer.py
index e95f36f..66a348f 100644
--- a/footer.py
+++ b/footer.py
@@ -34,13 +34,13 @@ class Event(ctypes.Structure):
         ]
 
 # Decorator for callback methods
-callbackmethod=ctypes.CFUNCTYPE(None, Event, ctypes.c_void_p)
+callbackmethod=ctypes.CFUNCTYPE(None, ctypes.POINTER(Event), ctypes.c_void_p)
 
 # Example callback method
 @callbackmethod
 def debug_callback(event, data):
     print "Debug callback method"
-    print "Event:", event.type
+    print "Event:", event.contents.type
     print "Data", data
 
 if __name__ == '__main__':



More information about the vlc-commits mailing list