Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-40522: Use PyThreadState_Get() in decimal
  • Loading branch information
corona10 committed Feb 20, 2021
commit d92ea60d745c13fe13f05a619f877838f7b9079f
4 changes: 2 additions & 2 deletions Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down