37 lines
1.2 KiB
Text
37 lines
1.2 KiB
Text
/* @file @SELF_HEADER@
|
|
*
|
|
* GENERATED by xo_pybind11_library() from
|
|
* share/xo-macros/pymodule-hpp.in
|
|
* -- edits will be overwritten. See @SELF_CMAKELISTS@.
|
|
*
|
|
* One template for every xo pybind11 module. Before this there were 18
|
|
* near-identical copies, one per subsystem, which drifted: xo-pyexpression's
|
|
* named a source path (src/xo_xo_pyexpression/) that has never existed.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/* This module's python name is xo.@SELF_MODULE@, but its init symbol is NOT:
|
|
* CPython looks for PyInit_<last dotted component>, so PYBIND11_MODULE() takes
|
|
* the bare name. The `xo.' prefix comes from the directory the .so is emitted
|
|
* into, not from anything in this header -- see xo_pybind11_library().
|
|
*
|
|
* example:
|
|
* PYBIND11_MODULE(@SELF_MACRO_PREFIX@_MODULE_NAME(), m) { ... }
|
|
*/
|
|
#define @SELF_MACRO_PREFIX@_MODULE_NAME() @SELF_MODULE@
|
|
|
|
/* the qualified name, for importing.
|
|
* example:
|
|
* py::module_::import(@SELF_MACRO_PREFIX@_MODULE_NAME_STR)
|
|
*/
|
|
#define @SELF_MACRO_PREFIX@_MODULE_NAME_STR "@SELF_QUALNAME@"
|
|
|
|
/* example:
|
|
* @SELF_MACRO_PREFIX@_IMPORT_MODULE()
|
|
* replaces
|
|
* py::module_::import("@SELF_QUALNAME@")
|
|
*/
|
|
#define @SELF_MACRO_PREFIX@_IMPORT_MODULE() py::module_::import("@SELF_QUALNAME@")
|
|
|
|
/* end @SELF_HEADER@ */
|