File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2690,7 +2690,7 @@ static PyType_Spec pattern_spec = {
2690
2690
.name = "re.Pattern" ,
2691
2691
.basicsize = sizeof (PatternObject ),
2692
2692
.itemsize = sizeof (SRE_CODE ),
2693
- .flags = Py_TPFLAGS_DEFAULT ,
2693
+ .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE ,
2694
2694
.slots = pattern_slots ,
2695
2695
};
2696
2696
@@ -2755,7 +2755,7 @@ static PyType_Spec match_spec = {
2755
2755
.name = "re.Match" ,
2756
2756
.basicsize = sizeof (MatchObject ),
2757
2757
.itemsize = sizeof (Py_ssize_t ),
2758
- .flags = Py_TPFLAGS_DEFAULT ,
2758
+ .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE ,
2759
2759
.slots = match_slots ,
2760
2760
};
2761
2761
@@ -2781,7 +2781,7 @@ static PyType_Slot scanner_slots[] = {
2781
2781
static PyType_Spec scanner_spec = {
2782
2782
.name = "_" SRE_MODULE ".SRE_Scanner" ,
2783
2783
.basicsize = sizeof (ScannerObject ),
2784
- .flags = Py_TPFLAGS_DEFAULT ,
2784
+ .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE ,
2785
2785
.slots = scanner_slots ,
2786
2786
};
2787
2787
You can’t perform that action at this time.
0 commit comments