Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(#18) Update test_initializer to be static
Browse files Browse the repository at this point in the history
That way each translation unit that defines a module can have the same
private declaration and the linker won't complain.
  • Loading branch information
leandor committed Nov 5, 2016
1 parent c5da283 commit e7cafcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/papi/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e7cafcf

Please sign in to comment.