Skip to content

Commit fb3bb8d

Browse files
orenmnserhiy-storchaka
authored andcommitted
[2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3952)
1 parent f15058a commit fb3bb8d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/_ctypes/stgdict.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ MakeAnonFields(PyObject *type)
288288
}
289289
if (Py_TYPE(descr) != &PyCField_Type) {
290290
PyErr_Format(PyExc_AttributeError,
291-
"'%U' is specified in _anonymous_ but not in "
292-
"_fields_",
293-
fname);
291+
"an item in _anonymous_ (index %zd) is not "
292+
"specified in _fields_",
293+
i);
294294
Py_DECREF(anon_names);
295295
Py_DECREF(descr);
296296
return -1;

0 commit comments

Comments
 (0)