From feee5d82f949e69ec65f7631b3d53371fbb16c3f Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 17 Oct 2024 22:14:00 -0400 Subject: [PATCH 1/2] gh-125674: Doc: Fix type of `newfunc` first parameter --- Doc/c-api/typeobj.rst | 4 ++-- .../2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index da1b5092fbf787..a08c62270a7299 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -355,7 +355,7 @@ slot typedefs +-----------------------------+-----------------------------+----------------------+ | :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * | | | | | -| | :c:type:`PyObject` * | | +| | :c:type:`PyTypeObject` * | | | | :c:type:`PyObject` * | | | | :c:type:`PyObject` * | | +-----------------------------+-----------------------------+----------------------+ @@ -2645,7 +2645,7 @@ Slot Type typedefs See :c:member:`~PyTypeObject.tp_free`. -.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *) +.. c:type:: PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *) See :c:member:`~PyTypeObject.tp_new`. diff --git a/Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst b/Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst new file mode 100644 index 00000000000000..9be1e3419bd246 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst @@ -0,0 +1,2 @@ +Fixed incorrect documented type for the first parameter of the +:c:type:`newfunc` C function type. From 945952030b8044a15903d0f99bbcd2e04d2c8308 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 17 Oct 2024 23:12:34 -0400 Subject: [PATCH 2/2] fixup! gh-125674: Doc: Fix type of `newfunc` first parameter --- .../2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst diff --git a/Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst b/Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst deleted file mode 100644 index 9be1e3419bd246..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2024-10-17-22-26-14.gh-issue-125674.uM2SgY.rst +++ /dev/null @@ -1,2 +0,0 @@ -Fixed incorrect documented type for the first parameter of the -:c:type:`newfunc` C function type.