mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-06 15:35:29 +08: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
|
// This subtraction cannot be negative, so dropping the sign
|
||||||
str line(pbase(), static_cast<size_t>(pptr() - pbase()));
|
str line(pbase(), static_cast<size_t>(pptr() - pbase()));
|
||||||
|
|
||||||
|
{
|
||||||
|
gil_scoped_acquire tmp;
|
||||||
pywrite(line);
|
pywrite(line);
|
||||||
pyflush();
|
pyflush();
|
||||||
|
}
|
||||||
|
|
||||||
setp(pbase(), epptr());
|
setp(pbase(), epptr());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user