summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2024-03-21 15:56:12 (GMT)
committerGitHub <noreply@github.com>2024-03-21 15:56:12 (GMT)
commitbbee57fa8c318cb26d6c8651254927a1972c9738 (patch)
tree244201e644486b2b5b241e6e40918dd390013027 /Include/internal
parente728303532168efab7694c55c82ea19b18bf8385 (diff)
downloadcpython-bbee57fa8c318cb26d6c8651254927a1972c9738.zip
cpython-bbee57fa8c318cb26d6c8651254927a1972c9738.tar.gz
cpython-bbee57fa8c318cb26d6c8651254927a1972c9738.tar.bz2
gh-76785: Clean Up Interpreter ID Conversions (gh-117048)
Mostly we unify the two different implementations of the conversion code (from PyObject * to int64_t. We also drop the PyArg_ParseTuple()-style converter function, as well as rename and move PyInterpreterID_LookUp().
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_interp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index 942f473..b28e8a3 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
@@ -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 *);
PyAPI_FUNC(int) _PyInterpreterState_IDInitref(PyInterpreterState *);
PyAPI_FUNC(int) _PyInterpreterState_IDIncref(PyInterpreterState *);