Use of "-r" option makes clang2py crash
Let say you have the following header api/api_version.h you want to parse:
#define API_NAME "this is a test"
#define API_VER_MAJOR 3
#define API_VER_MINOR 1
#define API_VER_PATCH 0
When using command clang2py -k emstu api/api_version.h, we got the following:
(...)
API_NAME "this is a test" # macro
API_VER_MAJOR = 3 # macro
API_VER_MINOR = 1 # macro
API_VER_PATCH = 0 # macro
__all__ = \
['API_NAME','API_VER_MAJOR', 'API_VER_MINOR', 'API_VER_PATCH']
But if using command clang2py -k emstu -r "API_VER_" api/api_version.h, we got an empty issue. Of course, I tried with several derivations of the regex ("$API_VER_.*", etc.)
Do you have any clue? Thanks
I was about to post about a similar issue. The -r option is broken. Best I could tell it's due to map() returning a map object and not a list. The code then fails silently here:
https://github.com/trolldbois/ctypeslib/blob/master/ctypeslib/codegen/codegenerator.py#L1095
wrapping the map function in list: list(map(re.compile, options.expressions)) on this line will fix:
https://github.com/trolldbois/ctypeslib/blob/master/ctypeslib/codegen/config.py#L43
fixed in main