Fixing gcc warning when -pedantic is used

Fixing warnings of the 'extra ;' type. One is spurious semicolon after
closing brace of the namespace, other comes from using
PYBIND11_DECLARE_HOLDER_TYPE macro.
This commit is contained in:
Kirill Kouzoubov 2016-03-22 20:43:05 +11:00
parent ed50e70f8c
commit 4fb2471e90
2 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ namespace {
py::object ref; // keep a reference py::object ref; // keep a reference
size_t index = 0; size_t index = 0;
}; };
}; }
void init_ex6(py::module &m) { void init_ex6(py::module &m) {
py::class_<Sequence> seq(m, "Sequence"); py::class_<Sequence> seq(m, "Sequence");

View File

@ -70,8 +70,8 @@ private:
}; };
/// Make pybind aware of the ref-counted wrapper type (s) /// Make pybind aware of the ref-counted wrapper type (s)
PYBIND11_DECLARE_HOLDER_TYPE(T, ref<T>); PYBIND11_DECLARE_HOLDER_TYPE(T, ref<T>)
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>); PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)
Object *make_object_1() { return new MyObject1(1); } Object *make_object_1() { return new MyObject1(1); }
ref<Object> make_object_2() { return new MyObject1(2); } ref<Object> make_object_2() { return new MyObject1(2); }