[issue46832] unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found

Artyom Polkovnikov report at bugs.python.org
Wed Feb 23 01:12:09 EST 2022


New submission from Artyom Polkovnikov <artyom.polkovnikov at gmail.com>:

1) Downloaded https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tar.xz

2) Compiled under MSVC 2019 with define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS

3) Got compilation error of file Objects/unicodeobject.c at line 15931, about undefined variable "interned", it is function _PyUnicode_ClearInterned(), uncompilable code is "if (interned == NULL) {".


This happens because when EXPERIMENTAL_ISOLATED_SUBINTERPRETERS is defined then INTERNED_STRINGS is undefined hence global variable "static PyObject *interned = NULL;" is not created, and _PyUnicode_ClearInterned() uses this global variable "interned".

For reference attaching my version of "unicodeobject.c" which has compilation error at line 15931.

----------
components: Subinterpreters
files: unicodeobject.c
messages: 413774
nosy: artyom.polkovnikov
priority: normal
severity: normal
status: open
title: unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found
type: compile error
versions: Python 3.10
Added file: https://bugs.python.org/file50637/unicodeobject.c

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46832>
_______________________________________


More information about the Python-bugs-list mailing list