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

Function PyExceptionClass_Check

python27-sys/src/pyerrors.rs:33–38  ·  view source on GitHub ↗
(x: *mut PyObject)

Source from the content-addressed store, hash-verified

31
32#[inline]
33pub unsafe fn PyExceptionClass_Check(x: *mut PyObject) -> c_int {
34 (PyClass_Check(x) != 0
35 || (PyType_Check(x) != 0
36 && PyType_FastSubclass(x as *mut PyTypeObject, Py_TPFLAGS_BASE_EXC_SUBCLASS) != 0))
37 as c_int
38}
39
40#[inline]
41pub unsafe fn PyExceptionInstance_Check(x: *mut PyObject) -> c_int {

Callers

nothing calls this directly

Calls 3

PyClass_CheckFunction · 0.85
PyType_CheckFunction · 0.70
PyType_FastSubclassFunction · 0.70

Tested by

no test coverage detected