mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
[3.13] Revert "gh-115432: Add critical section variant that handles a NULL object (GH-115433)" (GH-118861) (#118872)
This reverts commitad4f909e0e. The API ended up not being used. (cherry picked from commit46c808172f) Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
00ec116883
commit
b62cb5234b
2 changed files with 0 additions and 38 deletions
|
|
@ -49,15 +49,6 @@ test_critical_sections(PyObject *self, PyObject *Py_UNUSED(args))
|
|||
Py_END_CRITICAL_SECTION2();
|
||||
assert_nogil(!PyMutex_IsLocked(&d2->ob_mutex));
|
||||
|
||||
// Optional variant behaves the same if the object is non-NULL
|
||||
Py_XBEGIN_CRITICAL_SECTION(d1);
|
||||
assert_nogil(PyMutex_IsLocked(&d1->ob_mutex));
|
||||
Py_XEND_CRITICAL_SECTION();
|
||||
|
||||
// No-op
|
||||
Py_XBEGIN_CRITICAL_SECTION(NULL);
|
||||
Py_XEND_CRITICAL_SECTION();
|
||||
|
||||
Py_DECREF(d2);
|
||||
Py_DECREF(d1);
|
||||
Py_RETURN_NONE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue