8000 Add critical section API (#106) · python/pythoncapi-compat@2d18aec · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d18aec

Browse files
authored
Add critical section API (#106)
1 parent 39e2663 commit 2d18aec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pythoncapi_compat.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,13 @@ PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
13381338
}
13391339
#endif
13401340

1341+
#if PY_VERSION_HEX < 0x030D00B3
1342+
# define Py_BEGIN_CRITICAL_SECTION(op) {
1343+
# define Py_END_CRITICAL_SECTION() }
1344+
# define Py_BEGIN_CRITICAL_SECTION2(a, b) {
1345+
# define Py_END_CRITICAL_SECTION2() }
1346+
#endif
1347+
13411348
#if PY_VERSION_HEX < 0x030E0000 && PY_VERSION_HEX >= 0x03060000 && !defined(PYPY_VERSION)
13421349
typedef struct PyUnicodeWriter PyUnicodeWriter;
13431350

0 commit comments

Comments
 (0)
0