]> git.sesse.net Git - vlc/commit
python-ctypes: define a .value() method for enums in java code
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Thu, 10 Dec 2009 14:59:17 +0000 (15:59 +0100)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Thu, 10 Dec 2009 14:59:31 +0000 (15:59 +0100)
commitfb1a1c12dc808580f9246861262f22e454334b8e
tree0a544c13ae7d0406322a2f47fefc758a4d132c94
parent5ba19660a89f8d0f91e2ad5b052ce4aba5143874
python-ctypes: define a .value() method for enums in java code

ATM, java bindings use Enum.ordinal() to convert the enum name to its value. However, this approach is broken in the case of discontinuous enums such as libvlc_media_option_t.
Java bindings maintainers should convert their code to use the enum.value() method.
bindings/python-ctypes/generate.py