[vlc-commits] commit: python-vlc: fix return value in comment for libvlc methods using [ OUT] parameters (Olivier Aubert )
git at videolan.org
git at videolan.org
Thu Nov 18 18:45:30 CET 2010
vlc/python | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Thu Nov 18 08:26:08 2010 +0100| [d323422509952067315ddadc3bc535f6a9d75904] | committer: Olivier Aubert
python-vlc: fix return value in comment for libvlc methods using [OUT] parameters
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=d323422509952067315ddadc3bc535f6a9d75904
---
generate.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/generate.py b/generate.py
index 61a2972..3c7aef8 100755
--- a/generate.py
+++ b/generate.py
@@ -563,6 +563,11 @@ class _Enum(ctypes.c_ulong):
ret = [ l.replace('@return', '@return:') for l in lines if '@return' in l ]
params = [ python_param_re.sub('\\1:\\2', l) for l in lines if '@param' in l and not '[OUT]' in l ]
+ outparams = [ python_param_re.findall(l)[0][0] for l in lines if '@param' in l and '[OUT]' in l ]
+ if outparams:
+ # Replace the @return line
+ ret = [ '@return %s' % ", ".join(p.strip("@param ") for p in outparams) ]
+
if fix_first and params: # remove (self)
params = params[1:]
More information about the vlc-commits
mailing list