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

Function PyExceptionInstance_Class

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

Source from the content-addressed store, hash-verified

54
55#[inline]
56pub unsafe fn PyExceptionInstance_Class(x: *mut PyObject) -> *mut PyObject {
57 if PyInstance_Check(x) != 0 {
58 (*(x as *mut PyInstanceObject)).in_class as *mut PyObject
59 } else {
60 (*x).ob_type as *mut PyObject
61 }
62}
63
64#[cfg_attr(windows, link(name = "pythonXY"))]
65extern "C" {

Callers

nothing calls this directly

Calls 1

PyInstance_CheckFunction · 0.85

Tested by

no test coverage detected