mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
gh-76785: Drop PyInterpreterID_Type (gh-117101)
I added it quite a while ago as a strategy for managing interpreter lifetimes relative to the PEP 554 (now 734) implementation. Relatively recently I refactored that implementation to no longer rely on InterpreterID objects. Thus now I'm removing it.
This commit is contained in:
parent
abdd1f938f
commit
617158e078
18 changed files with 357 additions and 443 deletions
|
@ -2,7 +2,6 @@
|
|||
/* Thread and interpreter state structures and their interfaces */
|
||||
|
||||
#include "Python.h"
|
||||
#include "interpreteridobject.h" // PyInterpreterID_Type
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_ceval.h"
|
||||
#include "pycore_code.h" // stats
|
||||
|
@ -1131,10 +1130,6 @@ PyInterpreterState_GetDict(PyInterpreterState *interp)
|
|||
int64_t
|
||||
_PyInterpreterState_ObjectToID(PyObject *idobj)
|
||||
{
|
||||
if (PyObject_TypeCheck(idobj, &PyInterpreterID_Type)) {
|
||||
return _PyInterpreterID_GetID(idobj);
|
||||
}
|
||||
|
||||
if (!_PyIndex_Check(idobj)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"interpreter ID must be an int, got %.100s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue