From 73634b6db743e5b5b6fc5c64db020e4434cd41f0 Mon Sep 17 00:00:00 2001 From: Rune Paamand Date: Thu, 27 Sep 2018 16:26:42 +0200 Subject: [PATCH] Update iostream.h: Changed a local varname 'self' to 'self_' (#1535) * Update iostream.h: Changed a local varname 'self' to 'self_' Avoiding conflicts in namespace pybind11::self. https://github.com/pybind/pybind11/issues/1531 --- include/pybind11/iostream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/iostream.h b/include/pybind11/iostream.h index 3caf55639..182e8eefd 100644 --- a/include/pybind11/iostream.h +++ b/include/pybind11/iostream.h @@ -194,7 +194,7 @@ inline class_ add_ostream_redirect(module m, std::strin return class_(m, name.c_str(), module_local()) .def(init(), arg("stdout")=true, arg("stderr")=true) .def("__enter__", &detail::OstreamRedirect::enter) - .def("__exit__", [](detail::OstreamRedirect &self, args) { self.exit(); }); + .def("__exit__", [](detail::OstreamRedirect &self_, args) { self_.exit(); }); } NAMESPACE_END(PYBIND11_NAMESPACE)