hpyproject / hpy

HPy: a better API for Python

Home Page:https://hpyproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an example or test that uses HPy_mod_execute

mattip opened this issue · comments

In porting hpy-0.9 to PyPy, I could not find an example of using the HPy_mod_execute slot. It is mentioned in the documentation

The Python interpreter will create the module for us from the HPyModuleDef specification. Additional initialization can be done in the HPy_mod_execute slot

but there is no example of using that slot.

Not sure if we should do it in the quickstart example (since it is not really necessary in this example). But we can, ofc, link to one example. The incremental porting example shows it: https://docs.hpyproject.org/en/latest/porting-example/index.html#id1