NAME ^

classes/pyint.pmc - Python Integer

DESCRIPTION ^

PyInt extends PyObject to provide a Python integer.

Methods ^

PMC *clone()

Return a clone of the integer.

PMC* "__hex__"(PMC *self)

Returns the hex representation of self.

PMC* "__oct__"(PMC *self)

Returns the octal representation of self.

PMC* "__pos__"(PMC *self)

Returns the value of the prefix operator +.

PMC* "__truediv__"(PMC *self, PMC *value)

Divides self by *value and returns the result.

void absolute(dest)

Sets dest to the absolute value of SELF.

void add(PMC *value, PMC *dest)

Adds *value to the integer and returns the result in *dest.

void add_int(INTVAL b, PMC *dest)

Adds b to the integer and returns the result in *dest.

void bitwise_and(INTVAL value, PMC *dest)

Calculates the bitwise AND of the integer and *value and returns the result in *dest.

void bitwise_and_int(INTVAL value, PMC *dest)

Calculates the bitwise AND of the integer and *value and returns the result in *dest.

void bitwise_not(PMC *dest)

Calculates the bitwise NOT of the integer and returns the result in *dest.

void bitwise_or(PMC *value, PMC *dest)

Calculates the bitwise OR of the integer and *value and returns the result in *dest.

void bitwise_or_int(INTVAL value, PMC *dest)

Calculates the bitwise OR of the integer and value and returns the result in *dest.

void bitwise_shl(PMC *value, PMC *dest)

Calculates the bitwise shift left (<<<<>>) of the integer by *value and returns the result in *dest.

void bitwise_shl_int(INTVAL value, PMC *dest)

Calculates the bitwise shift left (<<<<>>) of the integer by value and returns the result in *dest.

void bitwise_shr(PMC *value, PMC *dest)

Calculates the bitwise shift right (<<>>>>) of the integer by *value and returns the result in *dest.

void bitwise_shr_int(INTVAL value, PMC *dest)

Calculates the bitwise shift right (<<>>>>) of the integer by value and returns the result in *dest.

void bitwise_xor(PMC *value, PMC *dest)

Calculates the bitwise XOR of the integer and *value and returns the result in *dest.

void bitwise_xor_int(INTVAL value, PMC *dest)

Calculates the bitwise XOR of the integer and value and returns the result in *dest.

INTVAL cmp(PMC *value)

Returns the result of comparing the integer with *value.

void divide(PMC *value, PMC *dest)

Divides the integer by the *value returns the result in *dest.

void divide_float(FLOAT value, PMC *dest)

Divides the integer by value and returns the result in *dest.

void divide_int(INTVAL value, PMC *dest)

Divides the integer by value and returns the result in *dest.

void floor_divide(PMC *value, PMC *dest)

Divides the integer by the *value returns the result in *dest.

void floor_divide_int(PMC *value, PMC *dest)

Divides the integer by the *value returns the result in *dest.

INTVAL get_bool()

Returns the boolean value of the integer.

PMC *get_class()

Return the class of this object.

INTVAL get_integer()

Returns the integer value of the integer.

FLOATVAL get_number()

Returns the float value of the integer.

STRING *get_string()

Returns the string value of the integer.

INTVAL hash()

Returns a unique hash for this value

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

Create a new integer

INTVAL is_same(PMC *value)

Returns whether the PMC is numerically equal to value.

INTVAL is_equal (PMC *value)

The == operation.

void logical_not(PMC *value)

Calculates the logical negation of the integer and returns the result in *value.

void modulus(PMC *value, PMC *dest)

Calculates the value of the integer C-style mod *value and returns the result in *dest.

void modulus_int(INTVAL value, PMC *dest)

Calculates the value of the integer C-style mod value and returns the result in *dest.

void multiply(PMC *value, PMC *dest)

Multiplies *value with the integer and returns the result in *dest.

void multiply_int(INTVAL value, PMC *dest)

Multiplies *value with the integer and returns the result in *dest.

void neg(PMC *dest)

Set dest to the negated value of SELF.

PMC *pow(PMC *value, PMC *dest)

Raises SELF to the power of *value and returns the result.

PMC *pow_float(FLOATVAL value, PMC *dest)

Raises SELF to the power of *value and returns the result.

PMC *pow_int(INTVAL *value, PMC *dest)

Raises SELF to the power of *value and returns the result.

void set_integer_native(INTVAL value)

Sets the value of the integer to the value of the PyInt *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.

void subtract(PMC *value, PMC *dest)

Subtracts *value from the integer and returns the result in *dest.

void subtract_int(INTVAL value, PMC *dest)

Subtracts value from the integer and returns the result in *dest.


parrot