parrotcode: Python Integer | |
Contents | Language Implementations | Python |
classes/pyint.pmc - Python Integer
PyInt
extends PyObject
to provide a Python integer.
PMC *get_bignum()
SELF
.PMC *clone()
PMC *divide(PMC *value, PMC *dest)
PMC *divide_int(INTVAL value, PMC *dest)
PMC *divide_float(FLOATVAL value, PMC *dest)
value
and returns the result in *dest
.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.INTVAL cmp(PMC *value)
*value
.INTVAL get_bool()
PMC *get_class()
INTVAL get_integer()
FLOATVAL get_number()
STRING *get_string()
INTVAL hash(size_t seed)
PMC* "__new__"(PMC *class, PMC *source)
INTVAL is_same(PMC *value)
value
.INTVAL is_equal (PMC *value)
==
operation.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
.
|