1use crate::object::*;
2use core::ffi::c_int;
3
4#[cfg(not(RustPython))]
5extern_libpython! {
6 pub static mut PySeqIter_Type: PyTypeObject;
7 pub static mut PyCallIter_Type: PyTypeObject;
8}
9
10#[inline]
11#[cfg(not(RustPython))]
12pub unsafe fn PySeqIter_Check(op: *mut PyObject) -> c_int {
13 Py_IS_TYPE(op, &raw mut PySeqIter_Type)
14}
15
16extern_libpython! {
17 #[cfg(RustPython)]
18 pub fn PySeqIter_Check(op: *mut PyObject) -> c_int;
19
20 #[cfg_attr(PyPy, link_name = "PyPySeqIter_New")]
21 pub fn PySeqIter_New(arg1: *mut PyObject) -> *mut PyObject;
22}
23
24#[inline]
25#[cfg(not(RustPython))]
26pub unsafe fn PyCallIter_Check(op: *mut PyObject) -> c_int {
27 Py_IS_TYPE(op, &raw mut PyCallIter_Type)
28}
29
30extern_libpython! {
31 #[cfg(RustPython)]
32 pub fn PyCallIter_Check(op: *mut PyObject) -> c_int;
33
34 #[cfg_attr(PyPy, link_name = "PyPyCallIter_New")]
35 pub fn PyCallIter_New(arg1: *mut PyObject, arg2: *mut PyObject) -> *mut PyObject;
36}