mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: deprecate size_t
(#11443)
This commit is contained in:
@ -11,7 +11,7 @@ pub:
|
||||
element_size int // size in bytes of one element in the array.
|
||||
pub mut:
|
||||
data voidptr
|
||||
offset int // in bytes (should be `size_t`)
|
||||
offset int // in bytes (should be `usize`)
|
||||
len int // length of the array.
|
||||
cap int // capacity of the array.
|
||||
}
|
||||
@ -150,7 +150,7 @@ pub fn (mut a array) sort_with_compare(callback fn (voidptr, voidptr) int) {
|
||||
$if freestanding {
|
||||
panic('sort does not work with -freestanding')
|
||||
} $else {
|
||||
unsafe { vqsort(a.data, size_t(a.len), size_t(a.element_size), callback) }
|
||||
unsafe { vqsort(a.data, usize(a.len), usize(a.element_size), callback) }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user