StackAlloc align v2
Posted to
tcl
by miguel at Tue Mar 18 16:08:42 GMT 2008
view raw
static inline int
OFFSET(
void *ptr)
{
int mask, i;
mask = TCL_ALLOCALIGN-1;
ptr++;
for
(i=1; (((intptr_t)ptr) & mask); i++, ptr++) {}
return
i;
}
Comments
Posted by jenglish at Tue Mar 18 16:44:24 GMT 2008
[text]
[code]
No good. Can't do arithmetic on (void *)s.
No good. Can't do arithmetic on (void *)s.
Recent Posts
tcl by Florentis
1 days ago
tcl by iobates
7 days ago
tcl by mookie
10 days ago
tcl by sebres
12 days ago
tcl by iobates
29 days ago
tcl by iobates
29 days ago
tcl by iobates
29 days ago
tcl by FLORENTIS
32 days ago
tcl by Florentis
32 days ago
tcl by schelte
38 days ago
Submit
New paste
Documentation
From Jabber
Comments
Posted by jenglish at Tue Mar 18 16:44:24 GMT 2008 [text] [code]
No good. Can't do arithmetic on (void *)s.