xo-pyutil: + example (mostly to make LSP happy)
This commit is contained in:
parent
bc601c472c
commit
e169a0d276
5 changed files with 51 additions and 8 deletions
21
example/ex1/pyutilexample.hpp.in
Normal file
21
example/ex1/pyutilexample.hpp.in
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* @file pyutilexample.hpp */
|
||||
|
||||
/* python requires module name = library name
|
||||
* example:
|
||||
* PYBIND11_MODULE(XO_PYUTILEXAMPLE_MODULE_NAME(), m) { ... }
|
||||
*/
|
||||
#define XO_PYUTILEXAMPLE_MODULE_NAME() @SELF_LIB@
|
||||
|
||||
/* example:
|
||||
* py::module_::import(XO_PYUTILEXAMPLE_MODULE_NAME_STR)
|
||||
*/
|
||||
#define XO_PYUTILEXAMPLE_MODULE_NAME_STR "@SELF_LIB@"
|
||||
|
||||
/* example:
|
||||
* XO_PYUTILEXAMPLE_IMPORT_MODULE()
|
||||
* replaces
|
||||
* py::module_::import("xo_pyexpression")
|
||||
*/
|
||||
#define XO_PYUTILEXAMPLE_IMPORT_MODULE() py::module_::import("@SELF_LIB@")
|
||||
|
||||
/* end pyutilexample.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue