[vlc-commits] python: fix return types for callbacks (#136)
albestro
git at videolan.org
Tue May 26 11:38:50 CEST 2020
vlc/python | branch: master | albestro <9337627+albestro at users.noreply.github.com> | Tue May 26 11:35:43 2020 +0200| [d06a7b5b8be55346aea42d526d48938b62e2ca4e] | committer: GitHub
python: fix return types for callbacks (#136)
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=d06a7b5b8be55346aea42d526d48938b62e2ca4e
---
generator/generate.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/generator/generate.py b/generator/generate.py
index 346a0fe..1827c09 100755
--- a/generator/generate.py
+++ b/generator/generate.py
@@ -604,7 +604,7 @@ class Parser(object):
pars = [Par.parse_param(p) for p in paramlist_re.split(pars)]
- yield Func(name, type_.replace(' ', '') + '*', pars, docs,
+ yield Func(name, type_.replace(' ', ''), pars, docs,
file_=self.h_file, line=line)
def parse_enums(self):
@@ -1241,10 +1241,7 @@ class _Enum(ctypes.c_uint):
name = self.class4(f.name) #PYCHOK flake
# return value and arg classes
- # Note: The f.type == 'void**' is a hack to generate a
- # valid ctypes signature, specifically for the
- # libvlc_video_lock_cb callback. It should be fixed in a better way (more generic)
- types = ', '.join([self.class4('void*' if f.type == 'void**' else f.type)] + #PYCHOK flake
+ types = ', '.join([self.class4(f.type)] + #PYCHOK flake
[self.class4(p.type, p.flags(f.out)[0]) for p in f.pars])
# xformed doc string with first @param
More information about the vlc-commits
mailing list