clarax-ffi 1.0.1

CPython 3.11+ C-API bindings for the ClaraX ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::object::*;
use std::ffi::c_int;

extern_libpython! {
    pub static mut PyRange_Type: PyTypeObject;
    pub static mut PyRangeIter_Type: PyTypeObject;
    pub static mut PyLongRangeIter_Type: PyTypeObject;
}

#[inline]
pub unsafe fn PyRange_Check(op: *mut PyObject) -> c_int {
    (Py_TYPE(op) == &raw mut PyRange_Type) as c_int
}