-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-76785: Clean Up Interpreter ID Conversions #117048
Changes from 6 commits
d299396
9869010
76db436
a10fe2a
7154bb6
6f9e5ec
1d3e30f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,8 +295,11 @@ _PyInterpreterState_SetFinalizing(PyInterpreterState *interp, PyThreadState *tst | |
} | ||
|
||
|
||
extern int64_t _PyInterpreterState_ObjectToID(PyObject *); | ||
|
||
// Export for the _xxinterpchannels module. | ||
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_LookUpID(int64_t); | ||
PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_LookUpIDObject(PyObject *); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this have a leading There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'll fix that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
||
PyAPI_FUNC(int) _PyInterpreterState_IDInitref(PyInterpreterState *); | ||
PyAPI_FUNC(int) _PyInterpreterState_IDIncref(PyInterpreterState *); | ||
|
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.
I see that in 3.12 this was a private API (leading
_
) but in 3.13 it lost the_
. It looks like you're going back to private. What about the handful of definitions above this line? Are any of them meant to be public?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.
That's a good question. They needn't be public at this point and it turns out interpreteridobject.h was never added to Python.h, so there shouldn't be a problem moving them. I'll do that here.
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.
On second thought, I'm going to remove the
InterpreterID
type, including this header file, in a separate PR. (I made some changes a few months ago that made the class unnecessary. It can be removed with a couple small tweaks.)