Skip to content

Instantly share code, notes, and snippets.

@steve-s
Created July 21, 2022 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steve-s/b4fc4d904fbd54f1354900b6d5a6c991 to your computer and use it in GitHub Desktop.
Save steve-s/b4fc4d904fbd54f1354900b6d5a6c991 to your computer and use it in GitHub Desktop.
static inline int HPy_IsTrue(HPyContext *ctx, HPy h)
{
return PyObject_IsTrue(_h2py(h));
}
// In CPython ABI mode, HPy handles == PyObject*
static inline PyObject* _h2py(HPy h) {
return (PyObject*) h._i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment