mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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().
This commit is contained in:
parent
e728303532
commit
bbee57fa8c
8 changed files with 143 additions and 178 deletions
|
|
@ -2303,7 +2303,7 @@ class InterpreterIDTests(unittest.TestCase):
|
|||
|
||||
def test_linked_lifecycle(self):
|
||||
id1 = _interpreters.create()
|
||||
_testcapi.unlink_interpreter_refcount(id1)
|
||||
_testinternalcapi.unlink_interpreter_refcount(id1)
|
||||
self.assertEqual(
|
||||
_testinternalcapi.get_interpreter_refcount(id1),
|
||||
0)
|
||||
|
|
@ -2319,7 +2319,7 @@ class InterpreterIDTests(unittest.TestCase):
|
|||
_testinternalcapi.get_interpreter_refcount(id1),
|
||||
0)
|
||||
|
||||
_testcapi.link_interpreter_refcount(id1)
|
||||
_testinternalcapi.link_interpreter_refcount(id1)
|
||||
self.assertEqual(
|
||||
_testinternalcapi.get_interpreter_refcount(id1),
|
||||
0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue