mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: disallow implicit conversion from fixed array to fooptr (#8823)
This commit is contained in:
@ -147,9 +147,13 @@ pub fn (n Number) str() string {
|
||||
// .hexstr returns a hexadecimal representation of the bignum `n`
|
||||
pub fn (n Number) hexstr() string {
|
||||
mut buf := [8192]byte{}
|
||||
// NB: C.bignum_to_string(), returns the HEXADECIMAL representation of the bignum n
|
||||
C.bignum_to_string(&n, buf, 8192)
|
||||
s := unsafe { tos_clone(buf) }
|
||||
mut s := ''
|
||||
unsafe {
|
||||
bp := &buf[0]
|
||||
// NB: C.bignum_to_string(), returns the HEXADECIMAL representation of the bignum n
|
||||
C.bignum_to_string(&n, bp, 8192)
|
||||
s = tos_clone(bp)
|
||||
}
|
||||
if s.len == 0 {
|
||||
return '0'
|
||||
}
|
||||
|
Reference in New Issue
Block a user