[Python-checkins] [3.8] Explicitly initialize like the surrounding code (GH-18717)

Stefan Krah webhook-mailer at python.org
Sat Feb 29 17:08:08 EST 2020


https://github.com/python/cpython/commit/fec6681f7ae3e8867bd0446aa993a0b5f23045f9
commit: fec6681f7ae3e8867bd0446aa993a0b5f23045f9
branch: 3.8
author: Stefan Krah <skrah at bytereef.org>
committer: GitHub <noreply at github.com>
date: 2020-02-29T23:08:04+01:00
summary:

[3.8] Explicitly initialize like the surrounding code (GH-18717)

files:
M Modules/_decimal/_decimal.c

diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index 4358c4d686758..df7c6e254bcf2 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -128,7 +128,7 @@ static PyObject *tls_context_key = NULL;
 /* Invariant: NULL or the most recently accessed thread local context */
 static PyDecContextObject *cached_context = NULL;
 #else
-static PyObject *current_context_var;
+static PyObject *current_context_var = NULL;
 #endif
 
 /* Template for creating new thread contexts, calling Context() without



More information about the Python-checkins mailing list