Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
Is typeof() standard C or a GNU extension?
The timer API: size or type safety?
Posted Dec 8, 2006 18:20 UTC (Fri) by giraffedata (subscriber, #1954)
I'ts GNU C. But it looks like it isn't necessary for this technique.
Posted Dec 8, 2006 19:42 UTC (Fri) by jzbiciak (✭ supporter ✭, #5246)
Are you certain? Let's look at that closely:
typeof(*data) *p = data;
timer->function = (void (*)(void *)) func;
timer->data = (void *) p;
(void)(0 && (func(p), 0));
I guess your statement is that the last line, (func(p)) could be rewritten as (func(data)) instead. I can see that.
Posted Jan 3, 2007 19:48 UTC (Wed) by rjbell4 (guest, #35764)
Posted Jan 3, 2007 19:59 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246)
Posted Jan 3, 2007 20:01 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds