scala-native-bindgen icon indicating copy to clipboard operation
scala-native-bindgen copied to clipboard

Bindgen crashes on enums mixed with macros (#define)

Open david-bouyssie opened this issue 4 years ago • 0 comments

Example of problematic definition:

enum XML_Status {
  XML_STATUS_ERROR = 0,
#define XML_STATUS_ERROR XML_STATUS_ERROR
  XML_STATUS_OK = 1,
#define XML_STATUS_OK XML_STATUS_OK
  XML_STATUS_SUSPENDED = 2
#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
};

See: https://github.com/libexpat/libexpat/blob/master/expat/lib/expat.h#L70

david-bouyssie avatar May 17 '21 18:05 david-bouyssie