-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose PyFrame_GetCode #2406
Expose PyFrame_GetCode #2406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's part of the stable ABI since 3.10, I think we can annotate it with #[cfg(any(Py_3_10, all(Py_3_9, not(Py_LIMITED_API))))]
?
https://docs.python.org/3/c-api/reflection.html#c.PyFrame_GetCode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, done
No description provided.