Skip to content

Commit 364656b

Browse files
committed
builtin: define C.abs()
1 parent 0887b59 commit 364656b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

vlib/builtin/cfns.c.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ fn C.chmod(&char, u32) int
5353
fn C.printf(&char, ...voidptr) int
5454

5555
fn C.puts(&char) int
56+
fn C.abs(f64) f64
5657

5758
fn C.fputs(str &char, stream &C.FILE) int
5859

vlib/v/parser/containers.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn (mut p Parser) array_init() ast.ArrayInit {
6969
// [100]u8
7070
elem_type = p.parse_type()
7171
if p.table.sym(elem_type).name == 'byte' {
72-
p.error('`byte` has been deprecated in favor of `u8`: use `[10]u8` instead of `[10]byte`')
72+
p.error('`byte` has been deprecated in favor of `u8`: use `[10]u8{}` instead of `[10]byte{}`')
7373
}
7474
last_pos = p.tok.pos()
7575
is_fixed = true

0 commit comments

Comments
 (0)