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 3 pythonic globals True, False, and __debug__.

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

void *invoke(void *next)

Pythonic object constructor. SELF is a Boolean Class object. Return a new bool object according to 2.1. Built-in Functions.

STRING *get_string ()

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

void set_integer_native (INTVAL 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.

void neg(PMC *dest)

Set dest to the negated value of SELF.

void logical_or(PMC *value, PMC *dest)

Sets the logical OR of the boolean and *value as the value of *dest.

Sets the logical AND of the boolean and *value as the value of *dest.

void logical_xor(PMC *value, PMC *dest)

Sets the logical XOR of the boolean and *value as the value of *dest.


parrot