MatthieuDartiailh / pyclibrary

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

Support for size_t #49

Open ocroquette opened 3 years ago

ocroquette commented 3 years ago

The standard C types like uint64_t are apparently supported out of the box by pyclibrary, but not size_t.

Workarounds for a 64bit DLL:

parser.add_def("types", "size_t", pyclibrary.c_parser.Type("uint64_t"))

or use the "replace" option of the Parser class to map it to "uint64_t":

replace = {
       "\\bsize_t\\b": "uint64_t",
    })

Would it be possible to support size_t natively ?