Skip to content

PEP7: Need to add a info "PyAPI_DATA() macro" #2182

@bobozi-cmd

Description

@bobozi-cmd

When I read PEP7 and check Cpython source code, I found a deficiency that in https://www.python.org/dev/peps/pep-0007/#code-lay-out.
In this section, document said that

For external functions and variables, we always have a declaration in an appropriate header file in the "Include" directory, which uses the PyAPI_FUNC() macro, like this: PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);

but when i check python 3.7.12+ and python 2.7.13, external variables actually uses the PyAPI_DATA() macro, like this:

PyAPI_DATA(PyTypeObject) PySuper_Type; /* built-in 'super' */

This may confuse beginners, could you please add this info in PEP7?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions