1use crate::object::*;
2use std::os::raw::c_int;
3use std::ptr::addr_of_mut;
4
5#[cfg_attr(windows, link(name = "pythonXY"))]
6extern "C" {
7 #[cfg_attr(PyPy, link_name = "PyPyRange_Type")]
8 pub static mut PyRange_Type: PyTypeObject;
9 pub static mut PyRangeIter_Type: PyTypeObject;
10 pub static mut PyLongRangeIter_Type: PyTypeObject;
11}
12
13#[inline]
14pub unsafe fn PyRange_Check(op: *mut PyObject) -> c_int {
15 (Py_TYPE(ob:op) == addr_of_mut!(PyRange_Type)) as c_int
16}
17