The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
531 B
22 lines
531 B
#define PY_SSIZE_T_CLEAN |
|
#include <Python.h> |
|
#include <boost/python.hpp> |
|
|
|
struct World |
|
{ |
|
void set(std::string msg) { this->msg = msg; } |
|
std::string greet() { return msg; } |
|
std::string version() { return std::to_string(PY_MAJOR_VERSION) + "." + std::to_string(PY_MINOR_VERSION); } |
|
std::string msg; |
|
}; |
|
|
|
|
|
BOOST_PYTHON_MODULE(MOD_NAME) |
|
{ |
|
using namespace boost::python; |
|
class_<World>("World") |
|
.def("greet", &World::greet) |
|
.def("set", &World::set) |
|
.def("version", &World::version) |
|
; |
|
}
|
|
|