ffi: methodobject: PyCFunction_Check: fix outdated def

This commit is contained in:
Nicholas Sim 2021-02-13 17:06:20 +08:00
parent d34856ba59
commit b35a6a58b0
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
use crate::ffi::object::{PyObject, PyTypeObject, Py_TYPE};
use crate::ffi::object::{PyObject, PyObject_TypeCheck, PyTypeObject, Py_TYPE};
use std::mem;
use std::os::raw::{c_char, c_int};
@ -16,7 +16,7 @@ pub unsafe fn PyCFunction_CheckExact(op: *mut PyObject) -> c_int {
#[inline]
pub unsafe fn PyCFunction_Check(op: *mut PyObject) -> c_int {
(Py_TYPE(op) == &mut PyCFunction_Type) as c_int
PyObject_TypeCheck(op, &mut PyCFunction_Type)
}
pub type PyCFunction =