[vlc-commits] discard function pointers from parse_param parsing

Alberto Invernizzi git at videolan.org
Wed Apr 29 13:12:17 CEST 2020


vlc/python | branch: master | Alberto Invernizzi <alby.inve at gmail.com> | Sun Mar 29 20:45:39 2020 +0200| [5cdd782b1bb0fceb111cb3b4559c4b23a18b906d] | committer: Alberto Invernizzi

discard function pointers from parse_param parsing

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

 generator/generate.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/generator/generate.py b/generator/generate.py
index d89f2d9..29124ba 100755
--- a/generator/generate.py
+++ b/generator/generate.py
@@ -699,6 +699,11 @@ class Parser(object):
             m = forward_re.match(param_raw)
             param_raw = m.group(1) + m.group(2)
 
+        # is this a function pointer?
+        RE_FUNC_POINTER = r'\(.+\)\s*\(.+\)'
+        if re.search(RE_FUNC_POINTER, param_raw):
+            return None
+
         # is this parameter a pointer?
         split_pointer = param_raw.split('*')
         if len(split_pointer) > 1:



More information about the vlc-commits mailing list