We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87a6ef1 commit b325856Copy full SHA for b325856
Modules/_dbmmodule.c
@@ -414,10 +414,9 @@ static PyType_Slot dbmtype_spec_slots[] = {
414
static PyType_Spec dbmtype_spec = {
415
.name = "_dbm.dbm",
416
.basicsize = sizeof(dbmobject),
417
- /*
418
- Calling PyType_GetModuleState() is safe
419
- because Py_TPFLAGS_BASETYPE flag is not used.
420
- */
+ // Calling PyType_GetModuleState() on a subclass is not safe.
+ // dbmtype_spec does not have Py_TPFLAGS_BASETYPE flag which prevents to create a subclass.
+ // So calling PyType_GetModuleState() in this file is always safe.
421
.flags = Py_TPFLAGS_DEFAULT,
422
.slots = dbmtype_spec_slots,
423
};
0 commit comments