Type Alias simics_api_sys::bindings::PyTypeObject

source ·
pub type PyTypeObject = _typeobject;
Expand description

PyTypeObject structure is defined in cpython/object.h. In Py_LIMITED_API, PyTypeObject is an opaque structure.

Aliased Type§

struct PyTypeObject {
Show 49 fields pub ob_base: PyVarObject, pub tp_name: *const i8, pub tp_basicsize: isize, pub tp_itemsize: isize, pub tp_dealloc: Option<unsafe extern "C" fn(_: *mut _object)>, pub tp_vectorcall_offset: isize, pub tp_getattr: Option<unsafe extern "C" fn(_: *mut _object, _: *mut i8) -> *mut _object>, pub tp_setattr: Option<unsafe extern "C" fn(_: *mut _object, _: *mut i8, _: *mut _object) -> i32>, pub tp_as_async: *mut PyAsyncMethods, pub tp_repr: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>, pub tp_as_number: *mut PyNumberMethods, pub tp_as_sequence: *mut PySequenceMethods, pub tp_as_mapping: *mut PyMappingMethods, pub tp_hash: Option<unsafe extern "C" fn(_: *mut _object) -> isize>, pub tp_call: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> *mut _object>, pub tp_str: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>, pub tp_getattro: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object) -> *mut _object>, pub tp_setattro: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> i32>, pub tp_as_buffer: *mut PyBufferProcs, pub tp_flags: u64, pub tp_doc: *const i8, pub tp_traverse: Option<unsafe extern "C" fn(_: *mut _object, _: Option<unsafe extern "C" fn(_: *mut _object, _: *mut c_void) -> i32>, _: *mut c_void) -> i32>, pub tp_clear: Option<unsafe extern "C" fn(_: *mut _object) -> i32>, pub tp_richcompare: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: i32) -> *mut _object>, pub tp_weaklistoffset: isize, pub tp_iter: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>, pub tp_iternext: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>, pub tp_methods: *mut PyMethodDef, pub tp_members: *mut PyMemberDef, pub tp_getset: *mut PyGetSetDef, pub tp_base: *mut _typeobject, pub tp_dict: *mut _object, pub tp_descr_get: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> *mut _object>, pub tp_descr_set: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> i32>, pub tp_dictoffset: isize, pub tp_init: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> i32>, pub tp_alloc: Option<unsafe extern "C" fn(_: *mut _typeobject, _: isize) -> *mut _object>, pub tp_new: Option<unsafe extern "C" fn(_: *mut _typeobject, _: *mut _object, _: *mut _object) -> *mut _object>, pub tp_free: Option<unsafe extern "C" fn(_: *mut c_void)>, pub tp_is_gc: Option<unsafe extern "C" fn(_: *mut _object) -> i32>, pub tp_bases: *mut _object, pub tp_mro: *mut _object, pub tp_cache: *mut _object, pub tp_subclasses: *mut _object, pub tp_weaklist: *mut _object, pub tp_del: Option<unsafe extern "C" fn(_: *mut _object)>, pub tp_version_tag: u32, pub tp_finalize: Option<unsafe extern "C" fn(_: *mut _object)>, pub tp_vectorcall: Option<unsafe extern "C" fn(_: *mut _object, _: *const *mut _object, _: usize, _: *mut _object) -> *mut _object>,
}

Fields§

§ob_base: PyVarObject§tp_name: *const i8

For printing, in format “.

§tp_basicsize: isize

For allocation

§tp_itemsize: isize

For allocation

§tp_dealloc: Option<unsafe extern "C" fn(_: *mut _object)>

Methods to implement standard operations

§tp_vectorcall_offset: isize§tp_getattr: Option<unsafe extern "C" fn(_: *mut _object, _: *mut i8) -> *mut _object>§tp_setattr: Option<unsafe extern "C" fn(_: *mut _object, _: *mut i8, _: *mut _object) -> i32>§tp_as_async: *mut PyAsyncMethods

formerly known as tp_compare (Python 2) or tp_reserved (Python 3)

§tp_repr: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>§tp_as_number: *mut PyNumberMethods

Method suites for standard classes

§tp_as_sequence: *mut PySequenceMethods§tp_as_mapping: *mut PyMappingMethods§tp_hash: Option<unsafe extern "C" fn(_: *mut _object) -> isize>

More standard operations (here for binary compatibility)

§tp_call: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> *mut _object>§tp_str: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>§tp_getattro: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object) -> *mut _object>§tp_setattro: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> i32>§tp_as_buffer: *mut PyBufferProcs

Functions to access object as input/output buffer

§tp_flags: u64

Flags to define presence of optional/expanded features

§tp_doc: *const i8

Documentation string

§tp_traverse: Option<unsafe extern "C" fn(_: *mut _object, _: Option<unsafe extern "C" fn(_: *mut _object, _: *mut c_void) -> i32>, _: *mut c_void) -> i32>

Assigned meaning in release 2.0 / / call function for all accessible objects

§tp_clear: Option<unsafe extern "C" fn(_: *mut _object) -> i32>

delete references to contained objects

§tp_richcompare: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: i32) -> *mut _object>

Assigned meaning in release 2.1 / / rich comparisons

§tp_weaklistoffset: isize

weak reference enabler

§tp_iter: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>

Iterators

§tp_iternext: Option<unsafe extern "C" fn(_: *mut _object) -> *mut _object>§tp_methods: *mut PyMethodDef

Attribute descriptor and subclassing stuff

§tp_members: *mut PyMemberDef§tp_getset: *mut PyGetSetDef§tp_base: *mut _typeobject

Strong reference on a heap type, borrowed reference on a static type

§tp_dict: *mut _object§tp_descr_get: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> *mut _object>§tp_descr_set: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> i32>§tp_dictoffset: isize§tp_init: Option<unsafe extern "C" fn(_: *mut _object, _: *mut _object, _: *mut _object) -> i32>§tp_alloc: Option<unsafe extern "C" fn(_: *mut _typeobject, _: isize) -> *mut _object>§tp_new: Option<unsafe extern "C" fn(_: *mut _typeobject, _: *mut _object, _: *mut _object) -> *mut _object>§tp_free: Option<unsafe extern "C" fn(_: *mut c_void)>

Low-level free-memory routine

§tp_is_gc: Option<unsafe extern "C" fn(_: *mut _object) -> i32>

For PyObject_IS_GC

§tp_bases: *mut _object§tp_mro: *mut _object

method resolution order

§tp_cache: *mut _object§tp_subclasses: *mut _object§tp_weaklist: *mut _object§tp_del: Option<unsafe extern "C" fn(_: *mut _object)>§tp_version_tag: u32

Type attribute cache version tag. Added in version 2.6

§tp_finalize: Option<unsafe extern "C" fn(_: *mut _object)>§tp_vectorcall: Option<unsafe extern "C" fn(_: *mut _object, _: *const *mut _object, _: usize, _: *mut _object) -> *mut _object>