[vlc-commits] fix constness check for Flag.Out
Alberto Invernizzi
git at videolan.org
Wed Apr 29 13:12:33 CEST 2020
vlc/python | branch: master | Alberto Invernizzi <alby.inve at gmail.com> | Thu Apr 2 18:29:15 2020 +0200| [670147c3e2d39b302146e986490c11610b1d5c09] | committer: Alberto Invernizzi
fix constness check for Flag.Out
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=670147c3e2d39b302146e986490c11610b1d5c09
---
generator/generate.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/generator/generate.py b/generator/generate.py
index b0c2f2c..11048f7 100755
--- a/generator/generate.py
+++ b/generator/generate.py
@@ -427,12 +427,15 @@ class Par(object):
"""
if self.name in out:
f = Flag.Out # @param [OUT]
- else:
+ elif not self.constness[0]:
f = {'int*': Flag.Out,
'unsigned*': Flag.Out,
'unsigned char*': Flag.Out,
'libvlc_media_track_info_t**': Flag.Out,
}.get(self.type, Flag.In) # default
+ else:
+ f = Flag.In
+
if default is None:
return f, # 1-tuple
else: # see ctypes 15.16.2.4 Function prototypes
More information about the vlc-commits
mailing list