[vlc-devel] commit: python-ctypes: capitalize enum names only if they do not already start with an uppercase letter (Olivier Aubert )
git version control
git at videolan.org
Mon Aug 10 00:35:26 CEST 2009
vlc | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Fri Aug 7 19:01:41 2009 +0200| [e863f5c9d3ad943351d4705c61274928f104c6c0] | committer: Olivier Aubert
python-ctypes: capitalize enum names only if they do not already start with an uppercase letter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e863f5c9d3ad943351d4705c61274928f104c6c0
---
bindings/python-ctypes/generate.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bindings/python-ctypes/generate.py b/bindings/python-ctypes/generate.py
index 4572e5a..87a5b37 100755
--- a/bindings/python-ctypes/generate.py
+++ b/bindings/python-ctypes/generate.py
@@ -206,7 +206,7 @@ def convert_enum_names(enums):
pyname=re.findall('(libvlc|mediacontrol)_(.+?)(_t)?$', name)[0][1]
if '_' in pyname:
pyname=pyname.title().replace('_', '')
- else:
+ elif not pyname[0].isupper():
pyname=pyname.capitalize()
res[name]=pyname
return res
More information about the vlc-devel
mailing list