Skip to content

Commit 894d0ea

Browse files
authored
bpo-46864: Suppress deprecation warnings for ob_shash. (GH-32042)
1 parent 795b365 commit 894d0ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Python/pystate.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ extern "C" {
4747
static PyThreadState *_PyGILState_GetThisThreadState(struct _gilstate_runtime_state *gilstate);
4848
static void _PyThreadState_Delete(PyThreadState *tstate, int check_current);
4949

50-
50+
/* Suppress deprecation warning for PyBytesObject.ob_shash */
51+
_Py_COMP_DIAG_PUSH
52+
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
5153
/* We use "initial" if the runtime gets re-used
5254
(e.g. Py_Finalize() followed by Py_Initialize(). */
5355
static const _PyRuntimeState initial = _PyRuntimeState_INIT;
56+
_Py_COMP_DIAG_POP
5457

5558
static int
5659
alloc_for_runtime(PyThread_type_lock *plock1, PyThread_type_lock *plock2,

0 commit comments

Comments
 (0)