[issue40601] [C API] Hide static types from the limited C API

Petr Viktorin report at bugs.python.org
Tue May 12 10:09:18 EDT 2020


Petr Viktorin <encukou at gmail.com> added the comment:

> For example, Objects/longobject.c defines "PyTypeObject PyLong_Type = {...};". This type is exposed in the limited C API (!)

Technically, it is not, see https://www.python.org/dev/peps/pep-0384/#structures
Structures like PyLong_Type are *not* part of the limited API.

> I propose to break the limited C API backward compatibility on purpose by removing these type definitions form the limited C API.

That could only be done in Python 4.0, or if we started C-API 4.0. But I don't think it's necessary here.

----------
nosy: +petr.viktorin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40601>
_______________________________________


More information about the Python-bugs-list mailing list