From: AN Long Date: Wed, 21 Feb 2024 17:35:53 +0000 (+0800) Subject: gh-115304: Add doc for initializing PyMutex as a global variable (#115305) X-Git-Tag: v3.13.0a5~293 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87a65a5bd446a6fc74db651e56b04c332e33fa07;p=thirdparty%2FPython%2Fcpython.git gh-115304: Add doc for initializing PyMutex as a global variable (#115305) --- diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h index 07bf3db16f3d..c89159b55e13 100644 --- a/Include/internal/pycore_lock.h +++ b/Include/internal/pycore_lock.h @@ -26,6 +26,9 @@ extern "C" { // Typical initialization: // PyMutex m = (PyMutex){0}; // +// Or initialize as global variables: +// static PyMutex m; +// // Typical usage: // PyMutex_Lock(&m); // ...