Skip to content

Commit

Permalink
[api] Use a flush in print() and println()
Browse files Browse the repository at this point in the history
  • Loading branch information
pajama-coder committed Jun 5, 2024
1 parent 221edef commit 893fa2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void print(int argc, const pjs::Value argv[]) {
auto len = std::get<1>(c);
std::cout.write(ptr, len);
}
std::cout.flush();
}

void println(int argc, const pjs::Value argv[]) {
Expand All @@ -65,6 +66,7 @@ void println(int argc, const pjs::Value argv[]) {
auto len = std::get<1>(c);
std::cout.write(ptr, len);
}
std::cout.flush();
}

} // namespace pipy
Expand Down

0 comments on commit 893fa2d

Please sign in to comment.