Skip to content

Commit

Permalink
Update iostream.h: Changed a local varname 'self' to 'self_' (pybind#…
Browse files Browse the repository at this point in the history
…1535)

* Update iostream.h: Changed a local varname 'self' to 'self_'

Avoiding conflicts in namespace pybind11::self.
pybind#1531
  • Loading branch information
paamand authored and wjakob committed Sep 27, 2018
1 parent e7761e3 commit 73634b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pybind11/iostream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 73634b6

Please sign in to comment.