parrotcode: Python Class | |
Contents | Language Implementations | Python |
pmc/pytype.pmc - Python Class
These are the vtable functions for the Python Type base class (i.e., methods you would expect to see on Python Classes
void add_method(STRING *method_name, PMC *sub)
PMC *find_method(STRING *method_name)
*method_name
and returns it.PMC *get_attr_str(STRING *name)
name
.PMC *get_class()
void *invoke(void *next)
PMC *subclass(STRING *name)
STRING *name()
STRING* name() {
PMC *name = VTABLE_getprop(INTERP, SELF, PyString_name);
return VTABLE_get_string(INTERP, name);
}
PMC* "__new__"(PMC *class, PMC *source)
|