We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bd6927 commit a4c094bCopy full SHA for a4c094b
Python/structmember.c
@@ -24,7 +24,6 @@ PyObject *
24
PyMember_GetOne(const char *obj_addr, PyMemberDef *l)
25
{
26
PyObject *v;
27
- char value;
28
if (l->flags & Py_RELATIVE_OFFSET) {
29
PyErr_SetString(
30
PyExc_SystemError,
@@ -80,11 +79,11 @@ PyMember_GetOne(const char *obj_addr, PyMemberDef *l)
80
79
case Py_T_STRING_INPLACE:
81
v = PyUnicode_FromString((char*)addr);
82
break;
83
- case Py_T_CHAR:
84
- // case ...: char value = ... requires a C23-compatible compiler
85
- value = FT_ATOMIC_LOAD_CHAR_RELAXED(*(char *) addr);
+ case Py_T_CHAR: {
+ char value;
86
v = PyUnicode_FromStringAndSize(&value, 1);
87
+ }
88
case _Py_T_OBJECT:
89
v = *(PyObject **)addr;
90
if (v == NULL)
0 commit comments