William Coleda <[EMAIL PROTECTED]> wrote:

> When invoking a PIR-defined object from C, what's the proper call?
> pmc_new ? (Does that handle class_init) ?

I don't understand the question. Do you want to instantiate an object?
If yes, just do the same as the respective opcodes are doing:

  cl = Parrot_class_lookup(interpreter, class_name_str);
  REG_PMC(5) = arg1;
  REG_INT(3) = 1;
  REG_PMC(2) = cl;
  o = VTABLE_instantiate(interpreter, cl);

or

  type = pmc_type(interpreter, class_name_str);
  o = pmc_new(interpreter, type);

In both cases the method class::__init is run if present.

leo

Reply via email to