NAME ^

classes/boolean.pmc - Boolean PMC

DESCRIPTION ^

This class implements a boolean value variable.

Albeit Boolean is derived from PerlInt, it doesn't morph to other types, its value is changed only.

Methods ^

class_init ()

Define 2 pythonic globals True, False.

XXX are these generally useful or should they be moved to src/py_func.c?

PMC *instantiate()

Object constructor. SELF is a Boolean Class object. Return a new bool object according to the passed PMC value.

STRING *get_string ()

Return "True" or "False" if python_mode is true.

void set_integer_native (INTVAL value)

void set_bool (INTVAL value)

void set_pmc (PMC *value)

void set_number_native (FLOATVAL value)

Sets the value to value evaluated in a boolean context.

void set_string_native (STRING *value)

Sets the value to *value evaluated in a boolean context.


parrot