NAME ^

src/classes/pair.pmc - Pair PMC

DESCRIPTION ^

A Pair PMC represents one key => value mapping like a one element hash.

Functions ^

void init()

Initializes the instance.

PMC *instantiate()

Class method to construct an Integer according to passed arguments.

void mark()

Marks the hash as live.

PMC *get_pmc_keyed_str(STRING *key)

PMC *get_pmc_keyed(PMC *key)

void set_pmc_keyed(PMC *key, PMC *value)

void set_pmc_keyed_str(STRING *key, PMC *value)

Set key and value. The key can only set once.

void assign_pmc (PMC *value)

Set the value of the Pair.

INTVAL is_equal(PMC *value)

The == operation.

Check if two Pairs hold the same keys and values.

void visit(visit_info *info)

Used during archiving to visit the elements in the pair.

void freeze(visit_info *info)

Used to archive the Pair.

void thaw(visit_info *info)

Used to unarchive the Pair.

Methods ^

METHOD PMC *key()

METHOD PMC *value()

METHOD PMC *kv()

Return the key, the value, or a tuple of (key, value) respectively.

POD ERRORS ^

Hey! The above document had some coding errors, which are explained below:

Around line 253:

You forgot a '=back' before '=head2'


parrot