X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FStg.h;h=2b2095f030788dcded1b7d270b159a4da38ca081;hb=eb5ecfbe174cda6b40a22f44b2b0cdfd2ef2f149;hp=7ac6b1a86427e25853412c3dda8749c1569a66aa;hpb=5ee6212c3b25c14db37bc01beeca67707736c406;p=ghc-hetmet.git diff --git a/includes/Stg.h b/includes/Stg.h index 7ac6b1a..2b2095f 100644 --- a/includes/Stg.h +++ b/includes/Stg.h @@ -74,6 +74,10 @@ #define BITS_PER_BYTE 8 #define BITS_IN(x) (BITS_PER_BYTE * sizeof(x)) +/* Compute offsets of struct fields + */ +#define STG_FIELD_OFFSET(s_type, field) ((StgWord)&(((s_type*)0)->field)) + /* * 'Portable' inlining: * INLINE_HEADER is for inline functions in header files (macros)