MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / PyMemAllocatorEx

Class PyMemAllocatorEx

python3-sys/src/pymem.rs:47–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45#[derive(Copy, Clone)]
46#[cfg(all(Py_3_5, not(Py_LIMITED_API)))]
47pub struct PyMemAllocatorEx {
48 pub ctx: *mut c_void,
49 pub malloc: Option<extern "C" fn(ctx: *mut c_void, size: size_t) -> *mut c_void>,
50 pub calloc:
51 Option<extern "C" fn(ctx: *mut c_void, nelem: size_t, elsize: size_t) -> *mut c_void>,
52 pub realloc:
53 Option<extern "C" fn(ctx: *mut c_void, ptr: *mut c_void, new_size: size_t) -> *mut c_void>,
54 pub free: Option<extern "C" fn(ctx: *mut c_void, ptr: *mut c_void) -> ()>,
55}
56
57#[cfg(Py_3_4)]
58#[cfg(not(Py_LIMITED_API))]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected