trolldbois / ctypeslib

Generate python ctypes classes from C headers. Requires LLVM clang
http://trolldbois.blogspot.com/search?q=ctypeslib
MIT License
217 stars 61 forks source link

Fix as_dict for arrays #133

Open faisal-shah opened 5 months ago

faisal-shah commented 5 months ago

If the field is an array, then the field type will not have the as_dict method bound to it. The Structure describing the individual elements in the array will have the asdict method. Because of this, hasattr(type, "as_dict") will always return False.