# rangeobject.rs - source
Source of the Rust file `/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.13.2/src/ffi/rangeobject.rs`.
Keywords: rust, rustlang, rust-lang

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15

    use crate::ffi::object::*;
    use std::os::raw::c_int;

    #[cfg_attr(windows, link(name = "pythonXY"))]
    extern "C" {
        #[cfg_attr(PyPy, link_name = "PyPyRange_Type")]
        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) == &mut PyRange_Type) as c_int
    }