[vlc-commits] Define wrapper for opaque Log struct (for libvlc >= 2.1)
Olivier Aubert
git at videolan.org
Mon Apr 1 23:50:27 CEST 2013
vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Mon Apr 1 23:49:39 2013 +0200| [5fafcfc68875925bd1cc272037aad8a4f01af91e] | committer: Olivier Aubert
Define wrapper for opaque Log struct (for libvlc >= 2.1)
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=5fafcfc68875925bd1cc272037aad8a4f01af91e
---
generate.py | 2 +-
header.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/generate.py b/generate.py
index 50d7015..a9887ca 100755
--- a/generate.py
+++ b/generate.py
@@ -723,7 +723,7 @@ class PythonGenerator(_Generator):
'libvlc_event_type_t': 'ctypes.c_uint',
'libvlc_event_manager_t*': 'EventManager',
'libvlc_instance_t*': 'Instance',
- 'libvlc_log_t*': 'Log',
+ 'libvlc_log_t*': 'Log_ptr',
'libvlc_log_iterator_t*': 'LogIterator',
'libvlc_log_subscriber_t*': 'ctypes.c_void_p', # Opaque struct, do not mess with it.
'libvlc_log_message_t*': 'ctypes.POINTER(LogMessage)',
diff --git a/header.py b/header.py
index 05a70ea..4f2ed05 100755
--- a/header.py
+++ b/header.py
@@ -277,6 +277,11 @@ def class_result(classname):
return classname(result)
return wrap_errcheck
+# Wrapper for the opaque struct libvlc_log_t
+class Log(ctypes.Structure):
+ pass
+Log_ptr = ctypes.POINTER(Log)
+
# FILE* ctypes wrapper, copied from
# http://svn.python.org/projects/ctypes/trunk/ctypeslib/ctypeslib/contrib/pythonhdr.py
class FILE(ctypes.Structure):
More information about the vlc-commits
mailing list