From e7cafcf239895fad8a3cdfb217b845acd9ed4b24 Mon Sep 17 00:00:00 2001 From: leandor Date: Sat, 5 Nov 2016 00:42:29 -0300 Subject: [PATCH] (#18) Update test_initializer to be static That way each translation unit that defines a module can have the same private declaration and the linker won't complain. --- src/papi/base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/papi/base.cpp b/src/papi/base.cpp index 36fb302..d27f34b 100644 --- a/src/papi/base.cpp +++ b/src/papi/base.cpp @@ -14,7 +14,7 @@ std::string submodule_func() { return "submodule_func()"; } -test_initializer modules([](py::module &m) { +static test_initializer modules([](py::module &m) { py::module m_sub = m.def_submodule("submodule"); m_sub.def("submodule_func", &submodule_func);