summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-20 06:56:47 (GMT)
committerGitHub <noreply@github.com>2022-07-20 06:56:47 (GMT)
commit84d58ad17baec0dda8a5ffd8d925343391e45b3e (patch)
treece3f941d091ac74d1350c91632f041f75220a383 /Modules
parentb3aec3ea58b6d8a492819666fe67164957f10dd9 (diff)
downloadcpython-84d58ad17baec0dda8a5ffd8d925343391e45b3e.zip
cpython-84d58ad17baec0dda8a5ffd8d925343391e45b3e.tar.gz
cpython-84d58ad17baec0dda8a5ffd8d925343391e45b3e.tar.bz2
GH-90699: fix ref counting of static immortal strings (gh-94850)
(cherry picked from commit 1834133e66d95a143c9df5f068b3109927aefd65) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/textio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 89094d6..3369694 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2244,7 +2244,7 @@ _textiowrapper_readline(textio *self, Py_ssize_t limit)
Py_CLEAR(chunks);
}
if (line == NULL) {
- line = &_Py_STR(empty);
+ line = Py_NewRef(&_Py_STR(empty));
}
return line;