mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +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
|
|
@ -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
|
||||
|
|
@ -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 *);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue