Klaas-Jan Stol wrote:

hi,

I'm currently trying to check out the NCI. As my Lua compiler only uses PMCs (and not I/N/S registers), calling C functions will only be done with PMCs.

I couldn't find info on this matter: suppose I have this string PMC, how can I access the actual string in it?

so, when calling:

void print_pmc(void *PMC)
{
   // how to access the string in P?
}

If it's a stringish PMC, then STRING *s = VTABLE_get_string(INTERP, p); will do it. You might also consider switching to branches/leo-ctx5. The new calling conventions do auto-conversion betwen PMCs and I/S/N in both directions for NCI too.

Thanks,
klaas-jan

leo

Reply via email to