|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
Full-automation entry point for the pybind11 rod: the expansion behind WELDER_MODULE(ns, pybind11). More...
Go to the source code of this file.
Macros | |
| #define | WELDER_DETAIL_MODULE_ENTRY_pybind11(ns, ...) |
| pybind11's expansion of the backend-agnostic WELDER_MODULE(ns, pybind11). | |
Full-automation entry point for the pybind11 rod: the expansion behind WELDER_MODULE(ns, pybind11).
Include this (instead of rod.hpp) when you want welder to emit the module's C entry symbol too, so no pybind11 macro appears in user code:
Definition in file module.hpp.
| #define WELDER_DETAIL_MODULE_ENTRY_pybind11 | ( | ns, | |
| ... ) |
pybind11's expansion of the backend-agnostic WELDER_MODULE(ns, pybind11).
Emits the PyInit_<ns> entry point, welds namespace ^^ns into it, then runs the optional trailing { } block as post-glue with the module handle named module in scope. The block is supplied as the body of a forward-declared, internally-linked glue function (the same technique PYBIND11_MODULE itself uses for its body), so WELDER_MODULE(ns, pybind11) { … } and WELDER_MODULE(ns, pybind11) {} both work. Defined at file scope (macros ignore namespaces); see <welder/module.hpp> for the WELDER_MODULE dispatch.
| ns | the namespace / module name token. |
| ... | optionally, the exact welder::welder<…> type to weld with (must be over a pybind11-module rod) — see WELDER_MODULE. |
Definition at line 31 of file module.hpp.