CythonCTypesBackend icon indicating copy to clipboard operation
CythonCTypesBackend copied to clipboard

Decorators

Open jparyani opened this issue 12 years ago • 1 comments

  • Updated (one of) the tests to match new syntax being generated.
  • Added better array/struct/union handling as fields/arguments

The logic in ExternDefTransform.py is becoming pretty convoluted, but essentially what's going on when transforming a cython type node to ctypes; if a type is categorized as a non-native type, I default it's ctype value to None, and it's string value to the passed in name. Setting it's ctype to None lets it run fine through ctypes-configure. After the configure I detect these types again and appropriately bubble up the originally passed in name.

Essentially type checking has been offloaded to a run-time problem, and we now take no responsibility for verifying types passed into structs/unions/function calls as actually existing at generation time. We should add automated integration tests as a post-generation step to close this gap?

jparyani avatar Apr 03 '12 03:04 jparyani