Skip to content

Commit

Permalink
Add critical section API (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum authored Aug 26, 2024
1 parent 39e2663 commit 2d18aec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pythoncapi_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,13 @@ PyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value,
}
#endif

#if PY_VERSION_HEX < 0x030D00B3
# define Py_BEGIN_CRITICAL_SECTION(op) {
# define Py_END_CRITICAL_SECTION() }
# define Py_BEGIN_CRITICAL_SECTION2(a, b) {
# define Py_END_CRITICAL_SECTION2() }
#endif

#if PY_VERSION_HEX < 0x030E0000 && PY_VERSION_HEX >= 0x03060000 && !defined(PYPY_VERSION)
typedef struct PyUnicodeWriter PyUnicodeWriter;

Expand Down

0 comments on commit 2d18aec

Please sign in to comment.