From 102c6bc259beb58a7d32ab2ede9ade6732d5f026 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 22 Mar 2022 14:41:13 +0900 Subject: [PATCH] bpo-46864: Suppress deprecation warnings for ob_shash. --- Python/pystate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Python/pystate.c b/Python/pystate.c index 1b4e31b95cd0bb..3e28a6ab69a989 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -47,10 +47,13 @@ extern "C" { static PyThreadState *_PyGILState_GetThisThreadState(struct _gilstate_runtime_state *gilstate); static void _PyThreadState_Delete(PyThreadState *tstate, int check_current); - +/* Suppress deprecation warning for PyBytesObject.ob_shash */ +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS /* We use "initial" if the runtime gets re-used (e.g. Py_Finalize() followed by Py_Initialize(). */ static const _PyRuntimeState initial = _PyRuntimeState_INIT; +_Py_COMP_DIAG_POP static int alloc_for_runtime(PyThread_type_lock *plock1, PyThread_type_lock *plock2,