]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38787: Update structures.rst docs (PEP 573) (GH-19980)
authorHai Shi <shihai1992@gmail.com>
Thu, 7 May 2020 17:16:01 +0000 (01:16 +0800)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 17:16:01 +0000 (19:16 +0200)
Doc/c-api/structures.rst
Modules/_testmultiphase.c

index 72c94459295c41d345ef113a7336be675a62baf2..ea97e1e715561f1e8ae38f1f5d225554c2b7c521 100644 (file)
@@ -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);
 
 
index 3084fc12a5ef51e52367b258c252484a7f46dacc..d69ae628fa7a40d3fc82a7baa3d25a5641a78fc3 100644 (file)
@@ -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