On Fri, Apr 06, 2007 at 01:01:27AM +0200, Leopold Toetsch wrote: > Am Donnerstag, 5. April 2007 17:22 schrieb via RT: > > # New Ticket Created by > > # Please include the string: [perl #42313] > > # in the subject line of all future correspondence about this issue. > > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42313 > > > > > > > load_func is not a void pointer. > > > > Index: src/dynext.c > > =================================================================== > > --- src/dynext.c (revision 17994) > > +++ src/dynext.c (working copy) > > @@ -288,7 +288,7 @@ > > string_cstring_free(cinit_func_name); > > } > > else { > > - load_func = (void *)NULL; > > + load_func = NULL; > > init_func = NULL; > > } > > There is some usage of this cast ... > > include/parrot/parrot.h:#define NULLfunc (funcptr_t)0 > > ... around to silent picky compilers. (Yes, a NULL data ptr and function ptr > might be different, but ...)
One can't assign (void *) 0 to a function pointer. It's not allowed under (strict) ANSI C (and therefore those picky compilers) So that NULLfunc is correct. But personally I prefer assigning plain 0. Nicholas Clark