On Monday 03 December 2007 14:09:26 pancake wrote: > I have been looking a bit inside PDDs and parrot source and find no way to > load a pointer to a function as a PMC inside the VM. > > What I want to do is to embed parrot into a C program and make some of the > functions of this C program available via NCI to the vm. > > I have achieved this by using the tip noted in docs/compiler_faq.pod > (thanks kjs!) which says I need to pass a null string to loadlib and > compile the parent C program with -export-dynamic which is GCC specific... > So imho looks like an ugly system- dependant 'hack'. > > I have found some interesting funcs in src/inter_misc.c but seems not to > fix the problem, can anybody give me an appoint? I know that the NCI part > is not yet finished, but IMHO these functions should follow the Parrot_ > name convention and make them available from the Parrot API.
Is there any reason you're not using the NCI opcodes from within PIR? That's the easy way to do it. -- c