NAME ^

src/pmc/object.pmc - An instance of a class

DESCRIPTION ^

Implements an instance of a class.

Functions ^

void init_pmc(PMC *class)

Instantiates an object of the given class.

void destory()

Free the object's underlying struct.

void mark()

Mark any referenced strings and PMCs.

PMC *get_attr_str(STRING *idx)

Gets the value of an attribute for this object. Will find the first attribute of the given name walking up the inheritance tree.

void set_attr_str(STRING *name, PMC *value)

Sets the value of an attribute for this object. Will set the first attribute of the given name walking up the inheritance tree.

PMC *find_method(STRING *method_name)

Walks the MRO of the class and finds the method with the given name.

SEE ALSO ^

docs/pdds/pdd15_objects.pod.


parrot