From b651502c11adc67fae7728238b22556ed747a7c2 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 28 May 2022 15:47:47 -0400 Subject: [PATCH] Expose PyFrame_GetCode --- pyo3-ffi/src/pyframe.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyo3-ffi/src/pyframe.rs b/pyo3-ffi/src/pyframe.rs index c58bc1fb..5adaaeb1 100644 --- a/pyo3-ffi/src/pyframe.rs +++ b/pyo3-ffi/src/pyframe.rs @@ -1,3 +1,5 @@ +#[cfg(Py_3_9)] +use crate::PyCodeObject; #[cfg(not(Py_LIMITED_API))] use crate::PyFrameObject; use std::os::raw::c_int; @@ -7,5 +9,6 @@ opaque_struct!(PyFrameObject); extern "C" { pub fn PyFrame_GetLineNumber(f: *mut PyFrameObject) -> c_int; + #[cfg(Py_3_9)] + pub fn PyFrame_GetCode(f: *mut PyFrameObject) -> *mut PyCodeObject; } -// skipped PyFrame_GetCode