From 87a65a5bd446a6fc74db651e56b04c332e33fa07 Mon Sep 17 00:00:00 2001 From: AN Long Date: Thu, 22 Feb 2024 01:35:53 +0800 Subject: gh-115304: Add doc for initializing PyMutex as a global variable (#115305) --- Include/internal/pycore_lock.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h index 07bf3db..c89159b 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); // ... -- cgit v0.12