1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os api: flush_stdout => flush

This commit is contained in:
yuyi
2020-03-03 07:00:30 +08:00
committed by GitHub
parent 895a1711cb
commit ea10f44fe6
5 changed files with 11 additions and 6 deletions

View File

@ -848,7 +848,7 @@ pub fn (v &V) log(s string) {
pub fn verror(s string) {
println('V error: $s')
os.flush_stdout()
os.flush()
exit(1)
}

View File

@ -1074,7 +1074,12 @@ pub fn log(s string) {
println('os.log: ' + s)
}
[deprecated]
pub fn flush_stdout() {
panic('Use `os.flush` instead of `os.flush_stdout`')
}
pub fn flush() {
C.fflush(stdout)
}

View File

@ -1028,7 +1028,7 @@ pub fn (s &Scanner) error(msg string) {
pub fn verror(s string) {
println('V error: $s')
os.flush_stdout()
os.flush()
exit(1)
}