Open
Description
Consider WNDPROC from WinUser.h:
typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
Where CALLBACK is defined as (context included):
#elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define CALLBACK __stdcall
Yet translate-c generates:
pub const WNDPROC = ?fn (HWND, UINT, WPARAM, LPARAM) callconv(.C) LRESULT;
with a .C, not .Stdcall convention.
For those not in the know, the difference between the two calling conventions is whether or not the caller or callee is responsible for clearing the stack after the call concludes. Getting this mixed up can make for 'fun' debugging sessions.