On Tue, 15 Aug 2000, Jarkko Hietaniemi wrote:
> On Tue, Aug 15, 2000 at 11:08:40AM -0700, Peter Prymmer wrote:
> >
> >
> > On VMS the 6620 kit fails to build out of the box owing to a "missing"
> > return() from the brand new Perl_magic_regdatum_set() function in mg.c:
>
> That's why there's 6640 with a void Perl_magic_regdatum_set().
Unfortunately it does not quite go far enough since we now
obtain a pointer mismatch error since MEMBER_TO_FPTR is
expecting an int:
CC/DECC
/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList
/Define=PERL_CORE GLOBALS.C
MEMBER_TO_FPTR(Perl_magic_regdatum_set), 0, 0, 0};
...............................^
%CC-W-PTRMISMATCH, In the initializer for PL_vtbl_regdatum.svt_set, the
referenced
type of the pointer value "Perl_magic_regdatum_set" is "function (pointer to
struct sv, pointer to struct magic) returning void", which is not compatible
with "function (pointer to struct sv, pointer to struct magic) returning int".
at line number 2856 in file DKB100:[PERL]PERL.H;1
%MMS-F-ABORT, For target GLOBALS.OBJ, CLI returned abort status: %X10B91260.
If I alter perl.h to have:
# define MEMBER_TO_VPTR(name) (void)name
then:
#ifdef VMS
EXT MGVTBL PL_vtbl_regdatum = {MEMBER_TO_FPTR(Perl_magic_regdatum_get),
MEMBER_TO_VPTR(Perl_magic_regdatum_set), 0,
0 , 0};
#else
EXT MGVTBL PL_vtbl_regdatum = {MEMBER_TO_FPTR(Perl_magic_regdatum_get),
MEMBER_TO_FPTR(Perl_magic_regdatum_set), 0,0, 0};
#endif
Then the compiler complains that the types are OK but that I need
to have an int rather than a void in an array initialization.
6640 will not build yet on VMS.
Peter Prymmer