
The docs say:
The ctx
is an opaque "context" argument that stands for the current
interpreter.
But "pof.c" indirects into the context object:
https://github.com/hpyproject/hpy/blob/8e20b89116c2993188157c09a6070a64f8efb...
That doesn't seem very opaque to me.
- Paul

The context structure layout is not intended to be opaque. It is an intentional part of the ABI.

I think that we wrote the docs before deciding that it was convenient to have things like h_None inside it. So, from the API point of view, HPyContext is not fully opaque because it contains h_None and company.
From the ABI point of view, the context was never meant to be opaque: the layout of the struct and the offsets of the various fields are part of the ABI.
I agree that we should improve our docs :)
On Sun, Dec 27, 2020 at 1:04 PM Simon Cross <hodgestar@gmail.com> wrote:

The context structure layout is not intended to be opaque. It is an intentional part of the ABI.

I think that we wrote the docs before deciding that it was convenient to have things like h_None inside it. So, from the API point of view, HPyContext is not fully opaque because it contains h_None and company.
From the ABI point of view, the context was never meant to be opaque: the layout of the struct and the offsets of the various fields are part of the ABI.
I agree that we should improve our docs :)
On Sun, Dec 27, 2020 at 1:04 PM Simon Cross <hodgestar@gmail.com> wrote:
participants (3)
-
Antonio Cuni
-
Paul Prescod
-
Simon Cross