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

STINNER Victor report at bugs.python.org
Tue May 26 11:15:54 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

> 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.

The symbol is exported by libpython:

$ objdump -T /lib64/libpython3.8.so.1.0|grep PyLong_Type
000000000030de00 g    DO .data	00000000000001a0  Base        PyLong_Type

A C extension can use a reference to PyLong_Type.

> I don't think it's necessary here.

Did you read my rationale (first message)? Do you mean that per-interpreter GIL is not worth it?

--

A first step would be to expose "CheckExact" macros as function calls in the limited C API.

----------

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


More information about the Python-bugs-list mailing list