mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
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
This commit is contained in:
parent
e7761e3383
commit
73634b6db7
@ -194,7 +194,7 @@ inline class_<detail::OstreamRedirect> add_ostream_redirect(module m, std::strin
|
||||
return class_<detail::OstreamRedirect>(m, name.c_str(), module_local())
|
||||
.def(init<bool,bool>(), 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)
|
||||
|
Loading…
Reference in New Issue
Block a user