Posted to tcl by miguel at Tue Mar 18 16:56:04 GMT 2008view raw

  1. #define WALLOCALIGN \
  2. (TCL_ALLOCALIGN/sizeof(Tcl_Obj *))
  3.  
  4. static inline int
  5. OFFSET(
  6. Tcl_Obj **ptr)
  7. {
  8. int mask = TCL_ALLOCALIGN-1;
  9. Tcl_Obj **new;
  10. new = (Tcl_Obj **) (((intptr_t)(ptr + WALLOCALIGN)) & ~mask);
  11. return (new - ptr);
  12. }