diff --git a/src/pEp/_gen/pEpModule.cc b/src/pEp/_gen/pEpModule.cc index b8bc418..98692cc 100644 --- a/src/pEp/_gen/pEpModule.cc +++ b/src/pEp/_gen/pEpModule.cc @@ -5,15 +5,24 @@ #include "adapter_main.hh" using namespace std; +namespace alib = pEp::Adapter; string testfunc() { return "fsdfg"; } +void *getSessionHandle() { + void *handle = static_cast(alib::session()); + return handle; +} + PYBIND11_MODULE(_gen, m) { m.doc() = "pybind11 example plugin"; // optional module docstring m.def("add", &testfunc, "A function which adds two numbers"); + // PEP_SESSION + m.def("get_handle", &getSessionHandle); + #include "gen/py_module.pybind11" }