Commit e08aa3c9 authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: really accomodate new and old-style exception message getting method

parent 61c4e1d4
...@@ -93,9 +93,9 @@ class LibVLCException(Exception): ...@@ -93,9 +93,9 @@ class LibVLCException(Exception):
# From libvlc_structures.h # From libvlc_structures.h
# This is version-dependent, depending on the presence of libvlc_exception_get_message. # This is version-dependent, depending on the presence of libvlc_errmsg
if hasattr(dll, 'libvlc_exception_get_message'): if hasattr(dll, 'libvlc_errmsg'):
# New-style message passing # New-style message passing
class VLCException(ctypes.Structure): class VLCException(ctypes.Structure):
"""libvlc exception. """libvlc exception.
...@@ -106,7 +106,7 @@ if hasattr(dll, 'libvlc_exception_get_message'): ...@@ -106,7 +106,7 @@ if hasattr(dll, 'libvlc_exception_get_message'):
@property @property
def message(self): def message(self):
return dll.libvlc_exception_get_message() return dll.libvlc_errmsg()
def init(self): def init(self):
libvlc_exception_init(self) libvlc_exception_init(self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment