Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 564 Bytes
#include <stdint.h>
// Stolen from Squirrelfish Extreme's JIT.cpp
// FIELD_OFFSET: Like the C++ offsetof macro, but you can use it with classes.
// The magic number 0x4000 is insignificant. We use it to avoid using NULL, since
// NULL can cause compiler problems, especially in cases of multiple inheritance.
#undef FIELD_OFFSET // Fix conflict with winnt.h.
#define FIELD_OFFSET(class, field) (reinterpret_cast<ptrdiff_t>(&(reinterpret_cast<class*>(0x4000)->field)) - 0x4000)
Something went wrong with that request. Please try again.