]> git.sesse.net Git - vlc/commitdiff
python-ctypes: really accomodate new and old-style exception message getting method
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Thu, 3 Sep 2009 08:50:34 +0000 (10:50 +0200)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Thu, 3 Sep 2009 08:53:09 +0000 (10:53 +0200)
bindings/python-ctypes/header.py

index cfe047b0e9375c5e2ff58402c02b1855ade12a18..d567b9bbdc9beb145ecbfd9463a45897315f715b 100755 (executable)
@@ -93,9 +93,9 @@ class LibVLCException(Exception):
 
 # 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
     class VLCException(ctypes.Structure):
         """libvlc exception.
@@ -106,7 +106,7 @@ if hasattr(dll, 'libvlc_exception_get_message'):
 
         @property
         def message(self):
-            return dll.libvlc_exception_get_message()
+            return dll.libvlc_errmsg()
 
         def init(self):
             libvlc_exception_init(self)