mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 12:30:19 +00:00
fix a bug
This commit is contained in:
parent
054a2a6873
commit
c75cf86270
@ -20,13 +20,12 @@ struct Timer{
|
||||
};
|
||||
|
||||
VM* newVM(){
|
||||
// disable buff of std::cout and std::cerr
|
||||
std::cout.setf(std::ios::unitbuf);
|
||||
std::cerr.setf(std::ios::unitbuf);
|
||||
VM* vm = createVM([](const char* str) {
|
||||
std::cout << str;
|
||||
std::cout.flush();
|
||||
}, [](const char* str) {
|
||||
std::cerr << str;
|
||||
std::cerr.flush();
|
||||
});
|
||||
return vm;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user