Skip to content

Commit 934432e

Browse files
committed
make [posix,nt].DirEntry immutable
1 parent ba55263 commit 934432e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Modules/posixmodule.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16035,11 +16035,14 @@ static PyType_Slot DirEntryType_slots[] = {
1603516035
};
1603616036

1603716037
static PyType_Spec DirEntryType_spec = {
16038-
MODNAME ".DirEntry",
16039-
sizeof(DirEntry),
16040-
0,
16041-
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION,
16042-
DirEntryType_slots
16038+
.name = MODNAME ".DirEntry",
16039+
.basicsize = sizeof(DirEntry),
16040+
.flags = (
16041+
Py_TPFLAGS_DEFAULT
16042+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
16043+
| Py_TPFLAGS_IMMUTABLETYPE
16044+
),
16045+
.slots = DirEntryType_slots
1604316046
};
1604416047

1604516048

0 commit comments

Comments
 (0)