mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Fix iostream when used with nogil (#1368)
This commit is contained in:
parent
95f750a87d
commit
047ce8c452
@ -43,8 +43,11 @@ private:
|
||||
// This subtraction cannot be negative, so dropping the sign
|
||||
str line(pbase(), static_cast<size_t>(pptr() - pbase()));
|
||||
|
||||
pywrite(line);
|
||||
pyflush();
|
||||
{
|
||||
gil_scoped_acquire tmp;
|
||||
pywrite(line);
|
||||
pyflush();
|
||||
}
|
||||
|
||||
setp(pbase(), epptr());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user