From d92ea60d745c13fe13f05a619f877838f7b9079f Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Sat, 20 Feb 2021 15:23:16 +0900 Subject: [PATCH] bpo-40522: Use PyThreadState_Get() in decimal --- Modules/_decimal/_decimal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c index 664d45a90481df..016540eb422f90 100644 --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -1551,7 +1551,7 @@ current_context_from_dict(void) /* Cache the context of the current thread, assuming that it * will be accessed several times before a thread switch. */ - tstate = PyThreadState_GET(); + tstate = PyThreadState_Get(); if (tstate) { cached_context = (PyDecContextObject *)tl_context; cached_context->tstate = tstate; @@ -1567,7 +1567,7 @@ current_context(void) { PyThreadState *tstate; - tstate = PyThreadState_GET(); + tstate = PyThreadState_Get(); if (cached_context && cached_context->tstate == tstate) { return (PyObject *)cached_context; }