jacob-carlborg / dstep

A tool for converting C and Objective-C headers to D modules
204 stars 37 forks source link

API macro erased but should be extern(System) #279

Open adamdruppe opened 2 years ago

adamdruppe commented 2 years ago

I ran this on the chromium embedded framework. It has functions like this:

int(CEF_CALLBACK move_to_next_attribute)(struct _cef_xml_reader_t self);

Inside the extern(C) block. Which is OK on Linux, but on Windows, that CEF_CALLBACK expands to __stdcall. So I believe this should be extern(System) pointer.

Given the preprocessor this is tricky to do but maybe some kind of hack could recognize the pattern anyway.

jacob-carlborg commented 2 years ago

Does CEF_CALLBACK expand do nothing on Posix?

adamdruppe commented 2 years ago

yes.