mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: add V64_PRINTFORMAT (part 2)
This commit is contained in:
parent
2700fd712b
commit
615a4b3452
@ -158,7 +158,7 @@ pub fn (n i64) hex() string {
|
||||
hex := malloc(len)
|
||||
// TODO
|
||||
//count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n)
|
||||
count := C.sprintf(charptr(hex), '0x%llx', n)
|
||||
count := C.sprintf(charptr(hex), C.V64_PRINTFORMAT, n)
|
||||
return tos(hex, count)
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ pub fn (n u64) hex() string {
|
||||
len := if n > 0 { n.str().len + 3 } else { 19 }
|
||||
hex := malloc(len)
|
||||
//count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n)
|
||||
count := C.sprintf(charptr(hex), '0x%llx', n)
|
||||
count := C.sprintf(charptr(hex), C.V64_PRINTFORMAT, n)
|
||||
//count := C.sprintf(charptr(hex), '0x%lx', n)
|
||||
return tos(hex, count)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user