[vlc-commits] python: fix callback wrapper ctypes mapping

Olivier Aubert git at videolan.org
Tue Mar 3 15:16:08 CET 2020


vlc/python | branch: master | Olivier Aubert <contact at olivieraubert.net> | Tue Mar  3 14:46:37 2020 +0100| [c01a4f6523a1e03919ed3a34d3d0f231b010dab1] | committer: Olivier Aubert

python: fix callback wrapper ctypes mapping

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=c01a4f6523a1e03919ed3a34d3d0f231b010dab1
---

 generator/generate.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/generator/generate.py b/generator/generate.py
index f661135..907ca9a 100755
--- a/generator/generate.py
+++ b/generator/generate.py
@@ -1173,10 +1173,10 @@ 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
+            # 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('void*' if f.type == 'void**' else 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