Merge pull request #2406 from alex/patch-1

Expose PyFrame_GetCode
This commit is contained in:
messense 2022-05-29 11:30:13 +08:00 committed by GitHub
commit f84c740e41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#[cfg(any(Py_3_10, all(Py_3_9, not(Py_LIMITED_API))))]
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(any(Py_3_10, all(Py_3_9, not(Py_LIMITED_API))))]
pub fn PyFrame_GetCode(f: *mut PyFrameObject) -> *mut PyCodeObject;
}
// skipped PyFrame_GetCode