Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
The :class:`!_random.Random` C type is now immutable. Patch by Bénédikt
Tran.
13 changes: 8 additions & 5 deletions Modules/_randommodule.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -595,11 +595,14 @@ static PyType_Slot Random_Type_slots[] ={
};

static PyType_Spec Random_Type_spec ={
"_random.Random",
sizeof(RandomObject),
0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
Random_Type_slots
.name = "_random.Random",
.basicsize = sizeof(RandomObject),
.flags = (
Py_TPFLAGS_DEFAULT
| Py_TPFLAGS_BASETYPE
| Py_TPFLAGS_IMMUTABLETYPE
),
.slots = Random_Type_slots
};

PyDoc_STRVAR(module_doc,
Expand Down
Loading