在 2019/9/29 22:43, Biswapriyo Nath 写道: > What is the difference between them? > >
`BOOL` is a typedef name used in Objective-C [1]. Depending on the configuration it is sometimes a typedef for `bool` and otherwise for `signed char`, and could cause confusion where an effective `int` is expected (an example is the return value of `GetMessage` [2]). When not compiled as objc `BOOL` is a macro defined as `WINBOOL` so there is no difference. The intention of this patch was this message on IRC yesterday: > [12:13:54] <jon_y> lh_mouse: someone reported a problem with the > libloaderapi.h change recently https://pastebin.com/hZYwzb03 > [18:03:33] <lh_mouse> the error mentioned this afternoon was caused by two > conflicting declarations of the same function in two headers, one of which > returns `BOOL` and the other returns `WINBOOL`. > [18:04:55] <lh_mouse> Unless compiled as objc, BOOL and WINBOOL are the same > thing, so the two declarations match with each other, and there is no error. [1] https://stackoverflow.com/questions/541289/objective-c-bool-vs-bool [2] https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessage -- Best regards, LH_Mouse
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public