parrotcode: Python Integer | |
Contents | Dynamic PMCs |
classes/pyint.pmc - Python Integer
PyInt
extends PyObject
to provide a Python integer.
PMC *clone()
PMC* "__hex__"(PMC *self)
self
.PMC* "__oct__"(PMC *self)
self
.PMC* "__pos__"(PMC *self)
+
.PMC* "__truediv__"(PMC *self, PMC *value)
self
by *value
and returns the result.void absolute(dest)
dest
to the absolute value of SELF.void add(PMC *value, PMC *dest)
*value
to the integer and returns the result in *dest
.void add_int(INTVAL b, PMC *dest)
b
to the integer and returns the result in *dest
.void bitwise_and(INTVAL value, PMC *dest)
AND
of the integer and *value
and returns the result in *dest
.void bitwise_and_int(INTVAL value, PMC *dest)
AND
of the integer and *value
and returns the result in *dest
.void bitwise_not(PMC *dest)
NOT
of the integer and returns the result in *dest
.void bitwise_or(PMC *value, PMC *dest)
OR
of the integer and *value
and returns the result in *dest
.void bitwise_or_int(INTVAL value, PMC *dest)
OR
of the integer and value
and returns the result in *dest
.void bitwise_shl(PMC *value, PMC *dest)
<<<<
>>) of the integer by *value
and returns the result in *dest
.void bitwise_shl_int(INTVAL value, PMC *dest)
<<<<
>>) of the integer by value
and returns the result in *dest
.void bitwise_shr(PMC *value, PMC *dest)
<<
>>>>) of the integer by *value
and returns the result in *dest
.void bitwise_shr_int(INTVAL value, PMC *dest)
<<
>>>>) of the integer by value
and returns the result in *dest
.void bitwise_xor(PMC *value, PMC *dest)
XOR
of the integer and *value
and returns the result in *dest
.void bitwise_xor_int(INTVAL value, PMC *dest)
XOR
of the integer and value
and returns the result in *dest
.INTVAL cmp(PMC *value)
*value
.void divide(PMC *value, PMC *dest)
*value
returns the result in *dest
.void divide_float(FLOAT value, PMC *dest)
value
and returns the result in *dest
.void divide_int(INTVAL value, PMC *dest)
value
and returns the result in *dest
.void floor_divide(PMC *value, PMC *dest)
*value
returns the result in *dest
.void floor_divide_int(PMC *value, PMC *dest)
*value
returns the result in *dest
.INTVAL get_bool()
PMC *get_class()
INTVAL get_integer()
FLOATVAL get_number()
STRING *get_string()
INTVAL hash()
PMC* "__new__"(PMC *class, PMC *source)
INTVAL is_same(PMC *value)
value
.INTVAL is_equal (PMC *value)
==
operation.void logical_not(PMC *value)
*value
.void modulus(PMC *value, PMC *dest)
mod
*value
and returns the result in *dest
.void modulus_int(INTVAL value, PMC *dest)
mod
value
and returns the result in *dest
.void multiply(PMC *value, PMC *dest)
*value
with the integer and returns the result in *dest
.void multiply_int(INTVAL value, PMC *dest)
*value
with the integer and returns the result in *dest
.void neg(PMC *dest)
dest
to the negated value of SELF
.PMC *pow(PMC *value, PMC *dest)
SELF
to the power of *value
and returns the result.PMC *pow_float(FLOATVAL value, PMC *dest)
SELF
to the power of *value
and returns the result.PMC *pow_int(INTVAL *value, PMC *dest)
SELF
to the power of *value
and returns the result.void set_integer_native(INTVAL value)
PyInt
*value
.void set_integer_same(PMC *value)
PyInt
*value
.void set_pmc(PMC *value)
*value
,
calling the appropriate set_*
method according to the type of *value
.void subtract(PMC *value, PMC *dest)
*value
from the integer and returns the result in *dest
.void subtract_int(INTVAL value, PMC *dest)
value
from the integer and returns the result in *dest
.
|