[pipe]: add Offset() util macro

This commit is contained in:
keithw
2007-11-21 11:04:20 +00:00
committed by José Fonseca
parent 79ad82477a
commit e87efe7407

View File

@@ -114,6 +114,7 @@ REALLOC( void *old_ptr, unsigned old_size, unsigned new_size )
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
#define Elements(x) sizeof(x)/sizeof(*(x))
#define Offset(TYPE, MEMBER) ((unsigned)&(((TYPE *)NULL)->MEMBER))
/**
* Return a pointer aligned to next multiple of 16 bytes.