Browse Source

_gen Add PEP_SESSION

REWORK
heck 5 years ago
parent
commit
dc0b769136
  1. 9
      src/pEp/_gen/pEpModule.cc

9
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<void *>(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"
}

Loading…
Cancel
Save