Skip to content

Commit

Permalink
win32 headers: Fix wrong IsEqualGUID() declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
dkl committed Mar 12, 2014
1 parent 3700722 commit 90e5352
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Version 0.91.0:
- The compiler no longer crashes (SIGFPE) on constant expressions containing signed integer division overflows, e.g. -2147483648 \ -1, which triggers SIGFPE when calculated on x86. The compiler now inserts 0 (-2147483648 \ -1 = 2147483648 which doesn't fit into a 32bit signed integer, and in theory overflows to 0) and shows a warning. Note: FB programs doing such divisions at run-time (e.g. <dim a as integer = -2147483648, b as integer = -1 : print a \ b>) may still run into SIGFPE crashes; this change just affects the compiler itself, not the generated code.
- When calling a byref function through a function pointer, the result may now be ignored, just like with normal function calls, or when calling normal functions through function pointers.
- STRPTR() on a CONST STRING (DIM s AS CONST STRING) did not preserve CONSTness and allowed modifying the string
- win/objbase.bi: Wrong IsEqualGUID() declaration, producing wrong result value (subsequently, all aliases such as IsEqualIID() were wrong too)


Version 0.90.1:
Expand Down
2 changes: 1 addition & 1 deletion inc/win/objbase.bi
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ end enum
#include once "win/unknwn.bi"
#include once "win/objidl.bi"

#define IsEqualGUID(rguid1, rguid2) (not memcmp(rguid1, rguid2, sizeof(GUID)))
#define IsEqualGUID(rguid1, rguid2) (-(memcmp(rguid1, rguid2, sizeof(GUID)) = 0))
#define IsEqualIID(id1,id2) IsEqualGUID(id1,id2)
#define IsEqualCLSID(id1,id2) IsEqualGUID(id1,id2)

Expand Down

0 comments on commit 90e5352

Please sign in to comment.