From 22f58dc80dec0db9b854680fdf4754f55bc17114 Mon Sep 17 00:00:00 2001 From: hai shi Date: Thu, 7 May 2020 23:48:15 +0800 Subject: [PATCH] update docs of structures.rst(PEP 573) --- Doc/c-api/structures.rst | 4 ++-- Modules/_testmultiphase.c | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 72c94459295c41..ea97e1e715561f 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -150,7 +150,7 @@ Implementing functions and methods The function signature is:: PyObject *PyCFunction(PyObject *self, - PyObject *const *args); + PyObject *args); .. c:type:: PyCFunctionWithKeywords @@ -159,7 +159,7 @@ Implementing functions and methods The function signature is:: PyObject *PyCFunctionWithKeywords(PyObject *self, - PyObject *const *args, + PyObject *args, PyObject *kwargs); diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c index 3084fc12a5ef51..d69ae628fa7a40 100644 --- a/Modules/_testmultiphase.c +++ b/Modules/_testmultiphase.c @@ -820,16 +820,12 @@ static PyModuleDef_Slot meth_state_access_slots[] = { }; static PyModuleDef def_meth_state_access = { - PyModuleDef_HEAD_INIT, /* m_base */ - "_testmultiphase_meth_state_access", /* m_name */ - PyDoc_STR("Module testing access" - " to state from methods."), - sizeof(meth_state), /* m_size */ - NULL, /* m_methods */ - meth_state_access_slots, /* m_slots */ - 0, /* m_traverse */ - 0, /* m_clear */ - 0, /* m_free */ + PyModuleDef_HEAD_INIT, + .m_name = "_testmultiphase_meth_state_access", + .m_doc = PyDoc_STR("Module testing access" + " to state from methods."), + .m_size = sizeof(meth_state), + .m_slots = meth_state_access_slots, }; PyMODINIT_FUNC