Bloves Mr <[EMAIL PROTECTED]> wrote: > hi,folks. > I am reading PMC C source code and reading some document(" > http://www.perl.com/pub/a/2002/01/30/pmcs.html").
Despite that the text is rather old, it's remarkably valid still. > Some questions: > *this PMC design have changed? The internal layout of the PMC structure has changed, yes. And it will likely change in the future. The internals of vtable calls and PMC structure data access is now hidden inside macros: SELF->data => PMC_data(SELF) SELF->cache.int_val => PMC_int_val(SELF) $1->vtable->bet_bool() => VTABLE_get_bool(INTERP, $1) and so on. For details you might consult include/parrot/pmc.h. > *any body offer some advice that learn PMC C source code and PMC's theory? Just have a look at existing PMCs in classes. Commonly used core classes are a good begin, e.g.: classes/integer.pmc ... the Integer PMC classes/resizablepmcarray.pmc ... standard PMC array or even classes/tqueue.pmc ... experimental thread-safe queue > Thanks. leo