| Re: [AD] fceil |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
In reply to Eric Botcazou <ebotcazou@xxxxxxxxxx>:
[snip - also input from others]
>typedef struct {
> union {
> void (*proc)(void);
> void *data;
> };
> int id;
>} GENERIC_PTR;
Unfortunately, in C, you can't initialise such a union from a simple
pointer. This is a problem because it will break existing code (both
inside Allegro, which we can fix, and outside Allegro, which we can't);
there are many places where a `void*' pointer can point to data or to a
function, etc. A prime example is the DIALOG structure.
Bye for now,
--
Laurence Withers, lwithers@xxxxxxxxxx
http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |