MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / PyExceptionClass_Check

Function PyExceptionClass_Check

python3-sys/src/pyerrors.rs:46–50  ·  view source on GitHub ↗
(x: *mut PyObject)

Source from the content-addressed store, hash-verified

44
45#[inline]
46pub unsafe fn PyExceptionClass_Check(x: *mut PyObject) -> c_int {
47 (PyType_Check(x) != 0
48 && PyType_FastSubclass(x as *mut PyTypeObject, Py_TPFLAGS_BASE_EXC_SUBCLASS) != 0)
49 as c_int
50}
51
52#[inline]
53pub unsafe fn PyExceptionInstance_Check(x: *mut PyObject) -> c_int {

Callers 1

from_instance_helperMethod · 0.50

Calls 2

PyType_CheckFunction · 0.70
PyType_FastSubclassFunction · 0.70

Tested by

no test coverage detected