gh-103583: Add ref. dependency between multibytecodec modules (#103589)

This commit is contained in:
Erlend E. Aasland 2023-04-19 10:02:17 -06:00 committed by GitHub
parent bd2ed066c8
commit a6b07b5a34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 14 deletions

View file

@ -63,6 +63,7 @@ typedef struct {
typedef struct {
PyObject_HEAD
const MultibyteCodec *codec;
PyObject *cjk_module;
} MultibyteCodecObject;
#define MultibyteCodec_Check(state, op) Py_IS_TYPE((op), state->multibytecodec_type)
@ -130,7 +131,13 @@ typedef struct {
#define MBENC_FLUSH 0x0001 /* encode all characters encodable */
#define MBENC_MAX MBENC_FLUSH
#define PyMultibyteCodec_CAPSULE_NAME "multibytecodec.__map_*"
typedef struct {
const MultibyteCodec *codec;
PyObject *cjk_module;
} codec_capsule;
#define MAP_CAPSULE "multibytecodec.map"
#define CODEC_CAPSULE "multibytecodec.codec"
#ifdef __cplusplus