It looks like some bits of my previous message got lost (probably between my chair and the keyboard), so I'm resending it.
I'm trying to write a PMC which handles curried subs (i.e., subs which only run when provided with enough arguments, when there are too few of them, it just stores the given arguments, then returns a new sub which only expects the remaining arguments). Writing it in PIR is (for the moment) excluded because of ticket #103. (I have no way to retrieve previous arguments without "self" in "invoke"). So I'm trying to write the PMC in C. Unfortunately, I have no idea of how to play with arguments from C, and Parrot's documentation so far has not be very helpful. Has someone got a few examples of, say: * retrieving the number of arguments passed to the sub (the idea would be to do that quickly without moving arguments: when there are enough arguments, I just want to run the actual code), * moving them around (to store them in a ResizablePMCArray, for example)? I looked at PDD03, but this mainly talks about PIR, and tried to understand what functions in src/call/pcc.c do (I have the feeling that my answer is in there, because of the code generated for METHODs in PMCs, yet running perldoc pcc.c was not very useful to me). Thanks, -- Florian, http://openweb.eu.org/ http://www.linux-france.org/ _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
