NAME ^

classes/perlint.pmc - Perl Integer

DESCRIPTION ^

PerlInt extends perlscalar to provide a Perl integer.

Methods ^

void *invoke(void *next)

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

void init()

Initializes the integer with a default value of 0.

void share()

FLOATVAL get_number()

Returns the floating-point value of the integer.

BIGNUM *get_bignum()

Unimplemented. Returns NULL.

STRING *get_string()

Returns the string value of the integer.

void set_integer_same(PMC *value)

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

void set_number(PMC *value)

Morphs the integer to a PerlNum and sets the value from *value.

void set_number_native(FLOATVAL value)

Morphs the integer to a PerlNum and sets the value from value.

void set_bignum(PMC *value)

void set_bignum_native(BIGNUM *value)

void set_string (PMC *value)

void set_string_native(STRING *value)

Sets the value of the integer to *value.

void add(PMC *value, PMC *dest)

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

Please note: the label syntax MMD_type: denote the behavior, if the right hand value is of that type. The part inside the braces is converted to a distinct function and gets mmd_registered for these two types.

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.

void multiply(PMC *value, PMC *dest)

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

void multiply_int(INTVAL value, PMC *dest)

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

void divide(PMC *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_int(INTVAL value, PMC *dest)

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

void cmodulus(PMC *value, PMC *dest)

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

void cmodulus_int(INTVAL value, PMC *dest)

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

void modulus(PMC *value, PMC *dest)

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

void modulus_int(INTVAL value, PMC *dest)

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

void neg(PMC *dest)

Set dest to the negated value of SELF.

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_and(PMC *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 AN of the integer and *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.

void bitwise_not(PMC *dest)

Calculates the bitwise NOT of the integer 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_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.

INTVAL is_equal (PMC *value)

The == operation.

INTVAL cmp(PMC *value)

Returns the result of comparing the integer with *value.

INTVAL cmp_num(PMC *value)

Returns the result of numerically comparing the integer with *value.

void logical_not(PMC *value)

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

void repeat(PMC *value, PMC *dest)

void repeat_int(INTVAL value, PMC *dest)

These two methods raise an "invalid operation" exception.

void increment()

Increments the integer.

void decrement()

Decrements the integer.

void absolute()

Sets dest to the absolute value of SELF.

void freeze(visit_info *info)

Used to archive the integer.

void thaw(visit_info *info)

Used to unarchive the integer.


parrot