summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r--Modules/cjkcodecs/multibytecodec.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index cb7182f..ba558d0 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -749,7 +749,7 @@ static PyType_Spec multibytecodec_spec = {
.name = MODULE_NAME ".MultibyteCodec",
.basicsize = sizeof(MultibyteCodecObject),
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- Py_TPFLAGS_DISALLOW_INSTANTIATION),
+ Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_IMMUTABLETYPE),
.slots = multibytecodec_slots,
};
@@ -1111,7 +1111,8 @@ static PyType_Slot encoder_slots[] = {
static PyType_Spec encoder_spec = {
.name = MODULE_NAME ".MultibyteIncrementalEncoder",
.basicsize = sizeof(MultibyteIncrementalEncoderObject),
- .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
+ .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_IMMUTABLETYPE),
.slots = encoder_slots,
};
@@ -1384,7 +1385,8 @@ static PyType_Slot decoder_slots[] = {
static PyType_Spec decoder_spec = {
.name = MODULE_NAME ".MultibyteIncrementalDecoder",
.basicsize = sizeof(MultibyteIncrementalDecoderObject),
- .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
+ .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_IMMUTABLETYPE),
.slots = decoder_slots,
};
@@ -1705,7 +1707,8 @@ static PyType_Slot reader_slots[] = {
static PyType_Spec reader_spec = {
.name = MODULE_NAME ".MultibyteStreamReader",
.basicsize = sizeof(MultibyteStreamReaderObject),
- .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
+ .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_IMMUTABLETYPE),
.slots = reader_slots,
};
@@ -1925,7 +1928,8 @@ static PyType_Slot writer_slots[] = {
static PyType_Spec writer_spec = {
.name = MODULE_NAME ".MultibyteStreamWriter",
.basicsize = sizeof(MultibyteStreamWriterObject),
- .flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
+ .flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE |
+ Py_TPFLAGS_IMMUTABLETYPE),
.slots = writer_slots,
};