From 561fd9471f1de94a151eddf0f268ca5428722616 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 20 Oct 2023 20:27:23 +0300 Subject: [PATCH] builtin: fix typos in builtin_writeln_should_write_at_once and builtin_writeln_should_write_at_once user defines --- CHANGELOG.md | 2 +- vlib/builtin/builtin.c.v | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bc1aabd623ba2..db3033526b3b18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -207,7 +207,7 @@ - gg: expand the `-d show_fps` background, so fps>100 will not overflow it - Math.big: restore gdc_euclid, use it for smaller numbers, fix bench_euclid.v . - Add new generic `arrays.uniq, arrays.uniq_only, arrays.uniq_only_repeated, arrays.uniq_all_repeated, arrays.distinct` -- builtin: add support for `-d bultin_writeln_should_write_at_once` and `-d bultin_write_buf_to_fd_should_use_c_write` (#19243) +- builtin: add support for `-d builtin_writeln_should_write_at_once` and `-d builtin_write_buf_to_fd_should_use_c_write` (#19243) - builtin: always show the assert message, if it was defined in the source, in non test programs too (fix #19240) - time: check if a day is a valid day of its month (#19232) - toml: Add generic automatic decoding and encoding of simple structs, when they don't implement custom methods (#17970) diff --git a/vlib/builtin/builtin.c.v b/vlib/builtin/builtin.c.v index da36c0454566bb..9f6b91bbb16d51 100644 --- a/vlib/builtin/builtin.c.v +++ b/vlib/builtin/builtin.c.v @@ -262,7 +262,7 @@ pub fn println(s string) { [manualfree] fn _writeln_to_fd(fd int, s string) { - $if !bultin_writeln_should_write_at_once ? { + $if !builtin_writeln_should_write_at_once ? { lf := u8(`\n`) _write_buf_to_fd(fd, s.str, s.len) _write_buf_to_fd(fd, &lf, 1) @@ -288,7 +288,7 @@ fn _write_buf_to_fd(fd int, buf &u8, buf_len int) { mut ptr := unsafe { buf } mut remaining_bytes := isize(buf_len) mut x := isize(0) - $if freestanding || vinix || bultin_write_buf_to_fd_should_use_c_write ? { + $if freestanding || vinix || builtin_write_buf_to_fd_should_use_c_write ? { unsafe { for remaining_bytes > 0 { x = C.write(fd, ptr, remaining_bytes)