| 27 | """ |
| 28 | |
| 29 | def __init__(self, header_file, parse_now=True): |
| 30 | # Get filenames for C and Py |
| 31 | self._c_fname = os.path.split(header_file)[1] |
| 32 | |
| 33 | # Get absolute filenames |
| 34 | self._c_filename = header_file |
| 35 | |
| 36 | # Init intermediate results |
| 37 | self._functionDefs = [] |
| 38 | self._constantDefs = [] |
| 39 | |
| 40 | # Init output |
| 41 | self._functions = {} |
| 42 | self._constants = {} |
| 43 | # cache of constant values for constant aliases |
| 44 | self._constant_values = {} |
| 45 | |
| 46 | # We are aware of the line number |
| 47 | self._linenr = 0 |
| 48 | |
| 49 | # Some stats |
| 50 | self.stat_types = set() |
| 51 | |
| 52 | if parse_now: |
| 53 | self.parse() |
| 54 | |
| 55 | def parse(self): |
| 56 | """Parse the header file!""" |