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

builtin: fix print mem leak on windows

This commit is contained in:
Delyan Angelov
2020-05-22 12:18:18 +03:00
parent fe0b587b1f
commit 88fa935376
3 changed files with 24 additions and 17 deletions

View File

@@ -24,19 +24,6 @@ fn builtin_init() {
// Do nothing
}
pub fn println(s string) {
// TODO: a syscall sys_write on linux works, except for the v repl.
// Probably it is a stdio buffering issue. Needs more testing...
// $if linux {
// $if !android {
// snl := s + '\n'
// C.syscall(/* sys_write */ 1, /* stdout_value */ 1, snl.str, s.len+1)
// return
// }
// }
C.printf('%.*s\n', s.len, s.str)
}
fn print_backtrace_skipping_top_frames(xskipframes int) bool {
skipframes := xskipframes + 2
$if macos {