Skip to content

Commit

Permalink
Define wrapper for opaque Log struct (for libvlc >= 2.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
oaubert committed Apr 1, 2013
1 parent b2e85cf commit 5fafcfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion generate.py
Expand Up @@ -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)',
Expand Down
5 changes: 5 additions & 0 deletions header.py
Expand Up @@ -277,6 +277,11 @@ def wrap_errcheck(result, func, arguments):
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):
Expand Down

0 comments on commit 5fafcfc

Please sign in to comment.