Skip to content

Commit a4c094b

Browse files
committed
scope
1 parent 4bd6927 commit a4c094b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Python/structmember.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ PyObject *
2424
PyMember_GetOne(const char *obj_addr, PyMemberDef *l)
2525
{
2626
PyObject *v;
27-
char value;
2827
if (l->flags & Py_RELATIVE_OFFSET) {
2928
PyErr_SetString(
3029
PyExc_SystemError,
@@ -80,11 +79,11 @@ PyMember_GetOne(const char *obj_addr, PyMemberDef *l)
8079
case Py_T_STRING_INPLACE:
8180
v = PyUnicode_FromString((char*)addr);
8281
break;
83-
case Py_T_CHAR:
84-
// case ...: char value = ... requires a C23-compatible compiler
85-
value = FT_ATOMIC_LOAD_CHAR_RELAXED(*(char *) addr);
82+
case Py_T_CHAR: {
83+
char value;
8684
v = PyUnicode_FromStringAndSize(&value, 1);
8785
break;
86+
}
8887
case _Py_T_OBJECT:
8988
v = *(PyObject **)addr;
9089
if (v == NULL)

0 commit comments

Comments
 (0)