Author: chromatic
Date: Sat Jan 10 13:04:15 2009
New Revision: 35352
Modified:
branches/pdd09gc_part2/src/pmc/integer.pmc
Log:
[PMC] Made instantiate vtable entry for Integer PMC use the new_pmc() wrapper,
instead of manipulating a PMC header directly.
Modified: branches/pdd09gc_part2/src/pmc/integer.pmc
==============================================================================
--- branches/pdd09gc_part2/src/pmc/integer.pmc (original)
+++ branches/pdd09gc_part2/src/pmc/integer.pmc Sat Jan 10 13:04:15 2009
@@ -67,12 +67,10 @@
*/
VTABLE PMC *instantiate(PMC *sig) {
- PMC * const ret = new_pmc_header(INTERP, 0);
+ PMC * const ret = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
opcode_t *arg_op = interp->current_args;
INTVAL init = 0;
- ret->vtable = interp->vtables[SELF->vtable->base_type];
-
if (SIG_ELEMS(sig) == 2) {
switch (SIG_ITEM(sig, 1)) {
case PARROT_ARG_I:
@@ -89,7 +87,7 @@
}
}
- PMC_int_val(ret) = init;
+ VTABLE_set_integer_native(INTERP, ret, init);
return ret;
}