gh-119344: Make critical section API public (#119353)

This makes the following macros public as part of the non-limited C-API for
locking a single object or two objects at once.

* `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()`
* `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()`

The supporting functions and structs used by the macros are also exposed for
cases where C macros are not available.
This commit is contained in:
Sam Gross 2024-06-21 15:50:18 -04:00 committed by GitHub
parent 03fa2df927
commit 8f17d69b7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 459 additions and 225 deletions

View file

@ -125,6 +125,7 @@
#include "import.h"
#include "abstract.h"
#include "bltinmodule.h"
#include "critical_section.h"
#include "cpython/pyctype.h"
#include "pystrtod.h"
#include "pystrcmp.h"