summaryrefslogtreecommitdiffstats
path: root/Modules/_testinternalcapi
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-09 23:06:35 (GMT)
committerGitHub <noreply@github.com>2024-05-09 23:06:35 (GMT)
commitb62cb5234be2f43833e52063bf32bff5b2cffc98 (patch)
treea66ad745575f502845eb2075d90ef4124cd0d555 /Modules/_testinternalcapi
parent00ec116883f71d51b4f27fe7f6ea98cf1f176e6e (diff)
downloadcpython-b62cb5234be2f43833e52063bf32bff5b2cffc98.zip
cpython-b62cb5234be2f43833e52063bf32bff5b2cffc98.tar.gz
cpython-b62cb5234be2f43833e52063bf32bff5b2cffc98.tar.bz2
[3.13] Revert "gh-115432: Add critical section variant that handles a NULL object (GH-115433)" (GH-118861) (#118872)
This reverts commit ad4f909e0e7890e027c4ae7fea74586667242ad3. The API ended up not being used. (cherry picked from commit 46c808172fd3148e3397234b23674bf70734fb55) Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Modules/_testinternalcapi')
-rw-r--r--Modules/_testinternalcapi/test_critical_sections.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/Modules/_testinternalcapi/test_critical_sections.c b/Modules/_testinternalcapi/test_critical_sections.c
index cdf8a70..1c0e049 100644
--- a/Modules/_testinternalcapi/test_critical_sections.c
+++ b/Modules/_testinternalcapi/test_critical_sections.c
@@ -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;