]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46864: Suppress deprecation warnings for ob_shash. (GH-32042)
authorInada Naoki <songofacandy@gmail.com>
Wed, 23 Mar 2022 08:11:22 +0000 (17:11 +0900)
committerGitHub <noreply@github.com>
Wed, 23 Mar 2022 08:11:22 +0000 (17:11 +0900)
Python/pystate.c

index 1b4e31b95cd0bb424cf073df8055ecbc8da6b325..3e28a6ab69a989ab4b09c6dc5471c5e65147dc7c 100644 (file)
@@ -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,