MatthieuDartiailh / pyclibrary

C parser and ctypes automation for python
http://pyclibrary.readthedocs.org
MIT License
66 stars 29 forks source link

Namespace support #56

Open Unarelith opened 3 years ago

Unarelith commented 3 years ago

Just tried 0.1.7 from pip, on a C++ file that exports C functions, and it works great but...

The thing is, all the C functions are inside a namespace, and they're not recognized at all, unless I remove the namespace.

Is there any way to fix this?

MatthieuDartiailh commented 3 years ago

The parser is meant to be a partial C parser (limited to the relevant information in the headers) and has no notion of c++ namespaces. It may be possible to alter the parser to ignore c++ namespaces but I do not have the bandwidth to look into it. Feel free to make a PR if you get something that works for you.