Skip to content

Commit

Permalink
bpo-46864: Suppress deprecation warnings for ob_shash. (GH-32042)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane authored Mar 23, 2022
1 parent 795b365 commit 894d0ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 894d0ea

Please sign in to comment.