Skip to content

Commit 94c15cb

Browse files
author
Erlend E. Aasland
committed
Address review: Add MODULE_NAME macro
1 parent 1b5b9fd commit 94c15cb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Modules/cjkcodecs/multibytecodec.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include "multibytecodec.h"
1111
#include "clinic/multibytecodec.c.h"
1212

13+
#define MODULE_NAME "_multibytecodec"
14+
1315
typedef struct {
1416
PyTypeObject *encoder_type;
1517
PyTypeObject *decoder_type;
@@ -730,7 +732,7 @@ static PyType_Slot multibytecodec_slots[] = {
730732
};
731733

732734
static PyType_Spec multibytecodec_spec = {
733-
.name = "_multibytecodec.MultibyteCodec",
735+
.name = MODULE_NAME ".MultibyteCodec",
734736
.basicsize = sizeof(MultibyteCodecObject),
735737
.flags = Py_TPFLAGS_DEFAULT,
736738
.slots = multibytecodec_slots,
@@ -1097,7 +1099,7 @@ static PyType_Slot encoder_slots[] = {
10971099
};
10981100

10991101
static PyType_Spec encoder_spec = {
1100-
.name = "_multibytecodec.MultibyteIncrementalEncoder",
1102+
.name = MODULE_NAME ".MultibyteIncrementalEncoder",
11011103
.basicsize = sizeof(MultibyteIncrementalEncoderObject),
11021104
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
11031105
.slots = encoder_slots,
@@ -1375,7 +1377,7 @@ static PyType_Slot decoder_slots[] = {
13751377
};
13761378

13771379
static PyType_Spec decoder_spec = {
1378-
.name = "_multibytecodec.MultibyteIncrementalDecoder",
1380+
.name = MODULE_NAME ".MultibyteIncrementalDecoder",
13791381
.basicsize = sizeof(MultibyteIncrementalDecoderObject),
13801382
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
13811383
.slots = decoder_slots,
@@ -1702,7 +1704,7 @@ static PyType_Slot reader_slots[] = {
17021704
};
17031705

17041706
static PyType_Spec reader_spec = {
1705-
.name = "_multibytecodec.MultibyteStreamReader",
1707+
.name = MODULE_NAME ".MultibyteStreamReader",
17061708
.basicsize = sizeof(MultibyteStreamReaderObject),
17071709
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
17081710
.slots = reader_slots,
@@ -1928,7 +1930,7 @@ static PyType_Slot writer_slots[] = {
19281930
};
19291931

19301932
static PyType_Spec writer_spec = {
1931-
.name = "_multibytecodec.MultibyteStreamWriter",
1933+
.name = MODULE_NAME ".MultibyteStreamWriter",
19321934
.basicsize = sizeof(MultibyteStreamWriterObject),
19331935
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
19341936
.slots = writer_slots,

0 commit comments

Comments
 (0)