mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:30:58 +00:00
include: Define CONTAINING_RECORD using the standard offsetof.
This commit is contained in:
parent
e3dd01a264
commit
649c982e60
|
@ -749,7 +749,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
|||
#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
|
||||
|
||||
#define CONTAINING_RECORD(address, type, field) \
|
||||
((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
|
||||
((type *)((PCHAR)(address) - offsetof(type, field)))
|
||||
|
||||
/* Types */
|
||||
|
||||
|
|
Loading…
Reference in a new issue