pyo3 0.6.0

Bindings to Python interpreter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::ffi2::object::*;
use std::os::raw::c_int;

#[cfg_attr(windows, link(name = "pythonXY"))]
extern "C" {
    pub static mut PyRange_Type: PyTypeObject;
}

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