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:
Eric Snow 2024-03-21 11:15:02 -06:00 committed by GitHub
parent abdd1f938f
commit 617158e078
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 357 additions and 443 deletions

View file

@ -1,14 +0,0 @@
#ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H
# error "this header file must not be included directly"
#endif
/* Interpreter ID Object */
PyAPI_DATA(PyTypeObject) PyInterpreterID_Type;
PyAPI_FUNC(PyObject *) PyInterpreterID_New(int64_t);
PyAPI_FUNC(PyObject *) PyInterpreterState_GetIDObject(PyInterpreterState *);
#ifdef Py_BUILD_CORE
extern int64_t _PyInterpreterID_GetID(PyObject *);
#endif

View file

@ -295,12 +295,11 @@ _PyInterpreterState_SetFinalizing(PyInterpreterState *interp, PyThreadState *tst
}
extern int64_t _PyInterpreterState_ObjectToID(PyObject *);
// Export for the _xxinterpchannels module.
// Exports for the _testinternalcapi module.
PyAPI_FUNC(int64_t) _PyInterpreterState_ObjectToID(PyObject *);
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_LookUpID(int64_t);
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_LookUpIDObject(PyObject *);
PyAPI_FUNC(int) _PyInterpreterState_IDInitref(PyInterpreterState *);
PyAPI_FUNC(int) _PyInterpreterState_IDIncref(PyInterpreterState *);
PyAPI_FUNC(void) _PyInterpreterState_IDDecref(PyInterpreterState *);

View file

@ -1,17 +0,0 @@
#ifndef Py_INTERPRETERIDOBJECT_H
#define Py_INTERPRETERIDOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_LIMITED_API
# define Py_CPYTHON_INTERPRETERIDOBJECT_H
# include "cpython/interpreteridobject.h"
# undef Py_CPYTHON_INTERPRETERIDOBJECT_H
#endif
#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERPRETERIDOBJECT_H */