From 89b97247607664b6b11e4f3ffc1e439f1adbe55c Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 11 Jun 2020 00:34:48 +0800 Subject: [PATCH] improve pybind11 --- packages/p/pybind11/xmake.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/p/pybind11/xmake.lua b/packages/p/pybind11/xmake.lua index bb31da09f..1f69fdd1b 100644 --- a/packages/p/pybind11/xmake.lua +++ b/packages/p/pybind11/xmake.lua @@ -20,11 +20,8 @@ package("pybind11") int add(int i, int j) { return i + j; } - namespace py = pybind11; - PYBIND11_PLUGIN(example) { - py::module m("example", "pybind11 example plugin"); + PYBIND11_MODULE(example, m) { m.def("add", &add, "A function which adds two numbers"); - return m.ptr(); } ]]}, {configs = {languages = "c++11"}})) end)