ctypeslib
ctypeslib copied to clipboard
Define with parenthesis not parsed
Under Ubuntu 18.04, when adding parenthesis to a define in Header file, it is not parsed with clang2py.
File lib1.h is the following :
#ifndef DEF_H
#define DEF_H
#define OS_DEF_SET -1
#define OS_DEF_CHECK 0
#define CPU_DEF_SET (-1)
#define CPU_DEF_CHECK (0)
#endif
When launching the parsing with command clang2py -k emstu lib1.h, we got the following output :
# -*- coding: utf-8 -*-
(....)
DEF_H = True # macro
OS_DEF_SET = -1 # macro
OS_DEF_CHECK = 0 # macro
# def CPU_DEF_SET(-1): # macro
# return
# def CPU_DEF_CHECK(0): # macro
# return
__all__ = \
['DEF_H', 'OS_DEF_CHECK', 'OS_DEF_SET']
How could we parse defines CPU_DEF_SET and CPU_DEF_CHECK without removing the parenthesis ?