Merge pull request #1327 from davidhewitt/pypy-warnings

pypy: fix more warnings
This commit is contained in:
David Hewitt 2020-12-19 10:58:35 +00:00 committed by GitHub
commit 1f64f98a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 10 deletions

View File

@ -12,14 +12,9 @@ extern "C" {
static mut _Py_TrueStruct: PyLongObject;
#[cfg_attr(PyPy, link_name = "PyPyBool_FromLong")]
pub fn PyBool_FromLong(arg1: c_long) -> *mut PyObject;
#[cfg(PyPy)]
#[link_name = "PyPyBool_Check"]
pub fn PyBool_Check(op: *mut PyObject) -> c_int;
}
#[inline]
#[cfg(not(PyPy))]
pub unsafe fn PyBool_Check(op: *mut PyObject) -> c_int {
(Py_TYPE(op) == &mut PyBool_Type) as c_int
}

View File

@ -17,14 +17,9 @@ extern "C" {
#[cfg_attr(PyPy, link_name = "PyPySlice_Type")]
pub static mut PySlice_Type: PyTypeObject;
pub static mut PyEllipsis_Type: PyTypeObject;
#[cfg(PyPy)]
#[link_name = "PyPySlice_Check"]
pub fn PySlice_Check(op: *mut PyObject) -> c_int;
}
#[inline]
#[cfg(not(PyPy))]
pub unsafe fn PySlice_Check(op: *mut PyObject) -> c_int {
(Py_TYPE(op) == &mut PySlice_Type) as c_int
}