0On Thu, 2007-04-26 at 07:12 +0000, Tuomo Valkonen wrote:
> On 2007-04-25, Ben Hutchings <[EMAIL PROTECTED]> wrote:
> > Is this change likely to be acceptable, Tuomo?
> 
> Umm... any kind of OO shit in C absolutely positively depends on
> function pointer casts.

I haven't noticed this being necessary in the GObject system.  It does
rely on data pointer casts, but those are fine.

> Or are you going to wrap all the _hundreds_
> of pseudo-dynamic functions? Over my dead body.
> 
> More uglier is the case of function pointers to data pointers used
> somewhere in the code. I haven't checked if there's a way around it,
> but then again, any sane architechture will have matching function 
> and data pointers. (Functions should be nothing special! They should
> be data like everything else! Stuff of the first class!)

While these casts aren't allowed in standard C, casting between void *
and function pointer types must work on any system which has dlopen().

Ben.

-- 
Ben Hutchings
If God had intended Man to program,
we'd have been born with serial I/O ports.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to