| 1 | use crate::object::*; |
| 2 | use std::os::raw::c_int; |
| 3 | use std::ptr::addr_of_mut; |
| 4 | |
| 5 | #[cfg_attr (windows, link(name = "pythonXY" ))] |
| 6 | unsafeextern "C" { |
| 7 | pub unsafestatic mut PySeqIter_Type: PyTypeObject; |
| 8 | pub unsafestatic mut PyCallIter_Type: PyTypeObject; |
| 9 | } |
| 10 | |
| 11 | #[inline ] |
| 12 | pub unsafe fn PySeqIter_Check(op: *mut PyObject) -> c_int { |
| 13 | (Py_TYPE(ob:op) == addr_of_mut!(PySeqIter_Type)) as c_int |
| 14 | } |
| 15 | |
| 16 | unsafeextern "C" { |
| 17 | #[cfg_attr (PyPy, link_name = "PyPySeqIter_New" )] |
| 18 | pub unsafefn PySeqIter_New(arg1: *mut PyObject) -> *mut PyObject; |
| 19 | } |
| 20 | |
| 21 | #[inline ] |
| 22 | pub unsafe fn PyCallIter_Check(op: *mut PyObject) -> c_int { |
| 23 | (Py_TYPE(ob:op) == addr_of_mut!(PyCallIter_Type)) as c_int |
| 24 | } |
| 25 | |
| 26 | unsafeextern "C" { |
| 27 | #[cfg_attr (PyPy, link_name = "PyPyCallIter_New" )] |
| 28 | pub unsafefn PyCallIter_New(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject; |
| 29 | } |
| 30 | |