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

Wrap PyInit_##name in macro to allow macros as module names #168

Merged
merged 1 commit into from Apr 1, 2023

Conversation

tttapa
Copy link
Contributor

@tttapa tttapa commented Apr 1, 2023

This is similar to what pybind11 does:

https://github.com/pybind/pybind11/blob/4ce05175d51a4685232452bdc1e9cbb13a240a65/include/pybind11/detail/common.h#LL372-L374

Pasting the macro argument directly does not work, as demonstrated by: https://godbolt.org/z/Kv9EEfEsY

@wjakob
Copy link
Owner

wjakob commented Apr 1, 2023

LGTM, thanks!

@wjakob wjakob merged commit 336eca7 into wjakob:master Apr 1, 2023
16 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants