Fix more problems caused by padding in the Capability structure
[ghc-hetmet.git] / includes / Stg.h
index 7ac6b1a..394c987 100644 (file)
 #define BITS_PER_BYTE 8
 #define BITS_IN(x) (BITS_PER_BYTE * sizeof(x))
 
+/* Compute offsets of struct fields
+ */
+#define FIELD_OFFSET(s_type, field) ((StgWord)&(((s_type*)0)->field))
+
 /*
  * 'Portable' inlining:
  * INLINE_HEADER is for inline functions in header files (macros)