NAME ^

classes/pyboolean.pmc - PyBoolean PMC

DESCRIPTION ^

This class implements a Python Boolean value variable.

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

Methods ^

void class_init()

Class initialization. Caches constant strings that will be used later.

PMC* "__new__"(PMC *class, PMC *source)

Create a new boolean

INTVAL get_bool()

Returns the boolean value.

PMC *get_class()

Return the class of this object.

STRING *get_string ()

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

INTVAL is_equal (PMC *value)

The == operation.

void logical_not()

Returns the negated value of the boolean.

void set_integer_native (INTVAL value)

void set_integer_same(PMC *value)

Sets the value of the integer to the value of the PyInt *value.

void set_pmc(PMC *value)

Sets the PMC *value, calling the appropriate set_* method according to the type of *value.


parrot