From 915c002ca6c63e448ca3bd961a09e5c7826e362e Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sun, 16 Jun 2019 13:29:31 +0100 Subject: [PATCH] Use PYBIND11_MODULE instead of PYBIND11_PLUGIN The latter is deprecated. --- src/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f1c988d..1f24af4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -170,12 +170,10 @@ void bindFunctions(pybind11::module& module) { } } -PYBIND11_PLUGIN(loot_api) { - pybind11::module module("loot_api", "A Python module that wraps the LOOT API, generated by pybind11."); +PYBIND11_MODULE(loot_api, module) { + module.doc() = "A Python module that wraps the LOOT API, generated by pybind11."; loot::bindEnums(module); loot::bindClasses(module); loot::bindFunctions(module); - - return module.ptr(); }