Bent Dax:
# vtable_ops.c(37) : error C2296: '+' : illegal, left operand has type
# 'add_method_t'
...
#       AUTO_OP add (p, p, p) {
#               ((op_func_t)((INTVAL)$2->vtable->add_1 +
# (INTVAL)$3->vtable->num_type))($2,$3,$1);
#       }

Okay, this is going to be a blow-by-blow of my little quest.

After thinking about this for a couple minutes, I came up with a
solution involving a macro (I can hear the groans from here):

#define VTABLE_CALL(vfunc, type)
((op_func_t)((INTVAL)vfunc+(INTVAL)type))

AUTO_OP add (p, p, p) {
        VTABLE_CALL($2->vtable->add_1, $3->vtable->num_type)($2, $3, $1);
}

After adjusting all applicable ops in that file to use that macro, I got
an error on this line of intclass.c:

        Parrot_base_vtables[enum_class_int] = (struct _vtable) {

Okay, can someone stop with the gcc-isms?  Changing that to:

        struct _vtable temp={
                ...
        };
        Parrot_base_vtables[enum_class_int] = temp;

fixed that, but then I got linker errors.  Ugh.

        LINK : fatal error LNK1104: cannot open file 'classes/intclass.obj'
        NMAKE : fatal error U1077: 'cl' : return code '0x2'

Turns out that for some mysterious reason intclass.obj was in . instead
of classes.  So I edited the Makefile to reflect that, which got me
this:

        core_ops.obj : error LNK2019: unresolved external symbol _sleep
referenced in function _Parrot_sleep_i
        test_prog.exe : fatal error LNK1120: 1 unresolved externals

At this point I have to leave.  I'll work on this more later.

--Brent Dax
[EMAIL PROTECTED]
Configure pumpking for Perl 6

When I take action, I'm not going to fire a $2 million missile at a $10
empty tent and hit a camel in the butt.
    --Dubya

Reply via email to