Primitive Type Cheat Sheet
The following table summarizes RPython’s primitive types and corresponding low-level types, FFI types, and C types.
RPython Type (Primitive) |
LL Type |
FFI Type |
C Type (64-bit Linux) |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
N/A |
|
|
|
|
|
|
|
|
|
RPython types start with
r_
can be imported from therpython.rlib.rarithmetic
module.Low-level types can be imported from the
rpython.rtyper.lltypesystem.lltype
module.FFI types can be imported from the
rpython.rtyper.lltypesystem.rffi
module.
The definitions of these types can be found in the following source code.
Arithmetic type (
r_*
): rpython/rlib/rarithmetic.pyFFI type: rpython/rtyper/lltypesystem/rffi.py
In addition to these primitive types, there are other types like pointer types for FFI.