Skip to content

Wrong type for first parameter of newfunc C function type #125674

@rhansen

Description

@rhansen

Documentation

The first parameter of the newfunc function type has type PyTypeObject *:

typedef PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *);

However, in a couple of places in the documentation it is shown as PyObject *:

+-----------------------------+-----------------------------+----------------------+
| :c:type:`newfunc` | .. line-block:: | :c:type:`PyObject` * |
| | | |
| | :c:type:`PyObject` * | |
| | :c:type:`PyObject` * | |
| | :c:type:`PyObject` * | |
+-----------------------------+-----------------------------+----------------------+

cpython/Doc/c-api/typeobj.rst

Lines 2647 to 2651 in a0f5c8e

.. c:type:: PyObject *(*newfunc)(PyObject *, PyObject *, PyObject *)
See :c:member:`~PyTypeObject.tp_new`.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions