From 66dda668cfb82a90915ef3df17abab11b675b862 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 8 Jun 2020 01:18:00 +0200 Subject: [PATCH] bpo-40881: Fix unicode_release_interned() Use Py_SET_REFCNT() in unicode_release_interned(). --- Objects/unicodeobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index e69bf01251cedd..df10888949aba9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -15669,13 +15669,13 @@ unicode_release_interned(void) } switch (PyUnicode_CHECK_INTERNED(s)) { case SSTATE_INTERNED_IMMORTAL: - Py_REFCNT(s) += 1; + Py_SET_REFCNT(s, Py_REFCNT(s) + 1); #ifdef INTERNED_STATS immortal_size += PyUnicode_GET_LENGTH(s); #endif break; case SSTATE_INTERNED_MORTAL: - Py_REFCNT(s) += 2; + Py_SET_REFCNT(s, Py_REFCNT(s) + 2); #ifdef INTERNED_STATS mortal_size += PyUnicode_GET_LENGTH(s); #endif pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy