pyo3_ffi/
pyframe.rs

1#[cfg(not(GraalPy))]
2#[cfg(any(Py_3_10, all(Py_3_9, not(Py_LIMITED_API))))]
3use crate::PyCodeObject;
4#[cfg(not(Py_LIMITED_API))]
5use crate::PyFrameObject;
6use std::os::raw::c_int;
7
8#[cfg(Py_LIMITED_API)]
9opaque_struct!(PyFrameObject);
10
11extern "C" {
12    pub fn PyFrame_GetLineNumber(f: *mut PyFrameObject) -> c_int;
13    #[cfg(not(GraalPy))]
14    #[cfg(any(Py_3_10, all(Py_3_9, not(Py_LIMITED_API))))]
15    pub fn PyFrame_GetCode(f: *mut PyFrameObject) -> *mut PyCodeObject;
16}