mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:13:01 +00:00
improved 2 defines
svn path=/trunk/; revision=6521
This commit is contained in:
parent
1edc640537
commit
a556f44333
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: mmtypes.h,v 1.16 2003/06/07 10:14:39 chorns Exp $ */
|
/* $Id: mmtypes.h,v 1.17 2003/11/03 20:27:51 gdalsnes Exp $ */
|
||||||
|
|
||||||
#ifndef _INCLUDE_DDK_MMTYPES_H
|
#ifndef _INCLUDE_DDK_MMTYPES_H
|
||||||
#define _INCLUDE_DDK_MMTYPES_H
|
#define _INCLUDE_DDK_MMTYPES_H
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
* PURPOSE: Returns the byte offset of a field within a structure
|
* PURPOSE: Returns the byte offset of a field within a structure
|
||||||
*/
|
*/
|
||||||
#ifndef FIELD_OFFSET
|
#ifndef FIELD_OFFSET
|
||||||
#define FIELD_OFFSET(Type,Field) (LONG)(&(((Type *)(0))->Field))
|
#define FIELD_OFFSET(Type,Field) ((LONG)(&(((Type *)(0))->Field)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
* Field = Name of the field whose address is none
|
* Field = Name of the field whose address is none
|
||||||
*/
|
*/
|
||||||
#ifndef CONTAINING_RECORD
|
#ifndef CONTAINING_RECORD
|
||||||
#define CONTAINING_RECORD(Address,Type,Field) (Type *)(((LONG)Address) - FIELD_OFFSET(Type,Field))
|
#define CONTAINING_RECORD(Address,Type,Field) ((Type *)(((LONG)Address) - FIELD_OFFSET(Type,Field)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue