Merge pull request #1327 from davidhewitt/pypy-warnings
pypy: fix more warnings
This commit is contained in:
commit
1f64f98a33
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue