python27_sys/
frameobject.rsuse libc::c_int;
use crate::code::{PyCodeObject, CO_MAXBLOCKS};
use crate::object::*;
use crate::pyport::Py_ssize_t;
use crate::pystate::PyThreadState;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PyTryBlock {
pub b_type: c_int,
pub b_handler: c_int,
pub b_level: c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct PyFrameObject {
#[cfg(py_sys_config = "Py_TRACE_REFS")]
pub _ob_next: *mut PyObject,
#[cfg(py_sys_config = "Py_TRACE_REFS")]
pub _ob_prev: *mut PyObject,
pub ob_refcnt: Py_ssize_t,
pub ob_type: *mut PyTypeObject,
pub ob_size: Py_ssize_t,
pub f_back: *mut PyFrameObject, pub f_code: *mut PyCodeObject, pub f_builtins: *mut PyObject, pub f_globals: *mut PyObject, pub f_locals: *mut PyObject, pub f_valuestack: *mut *mut PyObject, pub f_stacktop: *mut *mut PyObject,
pub f_trace: *mut PyObject, pub f_exc_type: *mut PyObject,
pub f_exc_value: *mut PyObject,
pub f_exc_traceback: *mut PyObject,
pub f_tstate: *mut PyThreadState,
pub f_lasti: c_int, pub f_lineno: c_int, pub f_iblock: c_int, pub f_blockstack: [PyTryBlock; CO_MAXBLOCKS], pub f_localsplus: [*mut PyObject; 1], }
#[cfg_attr(windows, link(name = "pythonXY"))]
extern "C" {
pub static mut PyFrame_Type: PyTypeObject;
}
#[inline]
pub unsafe fn PyFrame_Check(op: *mut PyObject) -> c_int {
((*op).ob_type == &mut PyFrame_Type) as c_int
}
ignore! {
#[inline]
pub unsafe fn PyFrame_IsRestricted(f: *mut PyFrameObject) -> c_int {
((*f).f_builtins != (*(*(*f).f_tstate).interp).builtins) as c_int
}
}
#[cfg_attr(windows, link(name = "pythonXY"))]
extern "C" {
pub fn PyFrame_New(
tstate: *mut PyThreadState,
code: *mut PyCodeObject,
globals: *mut PyObject,
locals: *mut PyObject,
) -> *mut PyFrameObject;
pub fn PyFrame_BlockSetup(
f: *mut PyFrameObject,
_type: c_int,
handler: c_int,
level: c_int,
) -> ();
pub fn PyFrame_BlockPop(f: *mut PyFrameObject) -> *mut PyTryBlock;
pub fn PyFrame_LocalsToFast(f: *mut PyFrameObject, clear: c_int) -> ();
pub fn PyFrame_FastToLocals(f: *mut PyFrameObject) -> ();
pub fn PyFrame_ClearFreeList() -> c_int;
pub fn PyFrame_GetLineNumber(f: *mut PyFrameObject) -> c_int;
}