Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogen: separate API and ABI #311

Open
fangerer opened this issue Apr 8, 2022 · 0 comments
Open

Autogen: separate API and ABI #311

fangerer opened this issue Apr 8, 2022 · 0 comments

Comments

@fangerer
Copy link
Contributor

fangerer commented Apr 8, 2022

I’m running more and more into the situation where we want to add user-visible API functions (e.g. HPyCapsule_GetContext ind PR #308 ) but map them to a more generic context function (e.g. ctx_Capsule_Get).
The current autogen tool does not directly allow to do so. The more generic context function will also be exposed as API function.

I’m thinking of having a public_api.h and a context_abi.h file. Then it would be possible to define an (optional) mapping between API and ABI functions in, for instance, conf.py. The default behavior would still be that a function in public_api.h would also define an ABI function if no custom mapping was specified.

Reasons for my request are:

  • In the docs, we state that the full API is defined in public_api.h but that’s actually no longer true. We already have macros/functions like HPy_New / _HPy_New.
  • We can write custom API functions in misc.h / misc_trampolines.h (which don’t show up in public_api.h , ofc) but we still need to define something in public_api.h which will be both API/ABI but sometimes this function isn’t meant to be used directly but is still exposed.
  • No debug wrapper will be generated for custom trampolines in misc.h / misc_trampolines.h.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant