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.rarithmeticmodule.Low-level types can be imported from the
rpython.rtyper.lltypesystem.lltypemodule.FFI types can be imported from the
rpython.rtyper.lltypesystem.rffimodule.
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.