oaubert / python-vlc

Python vlc bindings
GNU Lesser General Public License v2.1
381 stars 108 forks source link

generator: fix first function parse in header #234

Closed garfvl closed 1 year ago

garfvl commented 1 year ago

The "#define" regex does not seem to match empty value #define. For example, the "# define LIBVLC_API" line is not considered as define sequence. One of the consequence is the first function declaration detected is considered as part of a multiline block, and thus ignored.

Accepting "#define XXX" sequences as well as "#define XXX yyy" seems to fix the issue (first function declared in header missing).

oaubert commented 1 year ago

Actually my previous comment is wrong, since \s matches the trailing \n. And my first proposal \s*.*? would be very wrong. Your fix is fine, thanks.