diff options
author | Victor Stinner <vstinner@python.org> | 2020-09-08 13:33:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 13:33:08 (GMT) |
commit | bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f (patch) | |
tree | ea08572df86ee54fe48c034365937999004a8072 /Objects/unicodeobject.c | |
parent | 52a2df135c0470b1dbf889edc51b7c556ae4bc80 (diff) | |
download | cpython-bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f.zip cpython-bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f.tar.gz cpython-bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f.tar.bz2 |
bpo-1635741: Port _string module to multi-phase init (GH-22148)
Port the _string extension module to the multi-phase initialization
API (PEP 489).
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 82e09ad..fd0e8e0 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -16243,20 +16243,16 @@ static PyMethodDef _string_methods[] = { static struct PyModuleDef _string_module = { PyModuleDef_HEAD_INIT, - "_string", - PyDoc_STR("string helper module"), - 0, - _string_methods, - NULL, - NULL, - NULL, - NULL + .m_name = "_string", + .m_doc = PyDoc_STR("string helper module"), + .m_size = 0, + .m_methods = _string_methods, }; PyMODINIT_FUNC PyInit__string(void) { - return PyModule_Create(&_string_module); + return PyModuleDef_Init(&_string_module); } |