mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-03 04:57:21 +00:00
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:
parent
ed50e70f8c
commit
4fb2471e90
@ -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");
|
||||||
|
@ -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); }
|
||||||
|
Loading…
Reference in New Issue
Block a user