Leopold Toetsch wrote:
Sam Ruby <[EMAIL PROTECTED]> wrote:
--- nci.pmc 7 May 2004 10:33:26 -0000 1.27 +++ nci.pmc 20 Dec 2004 22:27:11 -0000 1.28
+=item C<PMC* get_attr_str(STRING *name)> + +Return attribute named C<name>. + +=cut + +*/ + + PMC* get_attr_str(STRING* idx) { + return VTABLE_getprop(INTERP, SELF, idx); + } + }
What is the rational for this pythonism in Parrot core?
Good catch. I've added the following directly to nci.pmc both to capture the rationale and to record a TODO.
--- nci.pmc 20 Dec 2004 22:27:11 -0000 1.28 +++ nci.pmc 21 Dec 2004 11:50:16 -0000 @@ -159,6 +159,16 @@
=cut
+TODO: refactor into a separate subclass, and either modify Pmc2c.pm and +enter_nci_method to directly build this subclass, or add code to morph +NCI instances into the correct subclass later. + +The line of code in test case t/pie/b3 that motivates this is: + + print "using", cmp.__name__ + +Where cmp may be a NCI subroutine. + */
PMC* get_attr_str(STRING* idx) {