[pypy-dev] PyCodeObject incompatibility

Dmitry Kovner dmitryk at lightrun.com
Thu Feb 10 01:01:39 EST 2022


Hello! I'm trying to build a low-level C API extension of cPython to be
used in PyPy. The extension extensively uses some fields of PyCodeObject (
https://github.com/python/cpython/blob/f87e616af038ee8963185e11b96841c81e8ef15a/Include/code.h#L23):
co_firstlineno, co_stacksize, co_consts
and so on. However, it seems these fields are not defined in the similar
structure of the PyPy  implementation:
https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.8/pypy/module/cpyext/include/code.h#L7.
Is it possible to get values of these fields using PyPy C API somehow?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/pypy-dev/attachments/20220210/ef140492/attachment.html>


More information about the pypy-dev mailing list