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

builtin: rename any_* -> *_literal - 2. part (#8032)

This commit is contained in:
Uwe Krüger
2021-01-11 22:58:15 +01:00
committed by GitHub
parent 77d2e82309
commit 5f95dd54bd
19 changed files with 194 additions and 176 deletions

View File

@@ -20,9 +20,9 @@ pub fn (x f64) str() string {
}
}
// str returns the value of the `any_float` as a `string`.
// str returns the value of the `float_literal` as a `string`.
[inline]
pub fn (d any_float) str() string {
pub fn (d float_literal) str() string {
return f64(d).str()
}

View File

@@ -162,9 +162,9 @@ pub fn (nn u32) str() string {
// return tos(buf + index, (max-index))
}
// str returns the value of the `any_int` as a `string`.
// str returns the value of the `int_literal` as a `string`.
[inline]
pub fn (n any_int) str() string {
pub fn (n int_literal) str() string {
return i64(n).str()
}
@@ -399,9 +399,9 @@ pub fn (nn i64) hex() string {
return u64(nn).hex()
}
// hex returns the value of the `any_int` as a hexadecimal `string`.
// hex returns the value of the `int_literal` as a hexadecimal `string`.
// Note that the output is ***not*** zero padded.
pub fn (nn any_int) hex() string {
pub fn (nn int_literal) hex() string {
return u64(nn).hex()
}
@@ -434,7 +434,7 @@ pub fn (nn u64) hex_full() string {
/*
pub fn (nn i64) hex_full() string { return u64_to_hex(u64(nn), 16) }
pub fn (nn any_int) hex_full() string { return u64_to_hex(nn, 16) }
pub fn (nn int_literal) hex_full() string { return u64_to_hex(nn, 16) }
pub fn (nn voidptr) hex_full() string { return u64_to_hex(nn, 16) }
pub fn (nn byteptr) hex_full() string { return u64_to_hex(nn, 16) }
*/