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:
@ -31,13 +31,13 @@ fn C.zip_entry_size(&Zip) u64
|
||||
|
||||
fn C.zip_entry_crc32(&Zip) u32
|
||||
|
||||
fn C.zip_entry_write(&Zip, voidptr, size_t) int
|
||||
fn C.zip_entry_write(&Zip, voidptr, usize) int
|
||||
|
||||
fn C.zip_entry_fwrite(&Zip, &char) int
|
||||
|
||||
fn C.zip_entry_read(&Zip, &voidptr, &size_t) int
|
||||
fn C.zip_entry_read(&Zip, &voidptr, &usize) int
|
||||
|
||||
fn C.zip_entry_noallocread(&Zip, voidptr, size_t) int
|
||||
fn C.zip_entry_noallocread(&Zip, voidptr, usize) int
|
||||
|
||||
fn C.zip_entry_fread(&Zip, &char) int
|
||||
|
||||
@ -196,7 +196,7 @@ pub fn (mut zentry Zip) create_entry(name string) ? {
|
||||
// for large entries, please take a look at zip_entry_extract function.
|
||||
pub fn (mut zentry Zip) read_entry() ?voidptr {
|
||||
mut buf := &byte(0)
|
||||
mut bsize := size_t(0)
|
||||
mut bsize := usize(0)
|
||||
res := C.zip_entry_read(zentry, unsafe { &voidptr(&buf) }, &bsize)
|
||||
if res == -1 {
|
||||
return error('szip: cannot read properly data from entry')
|
||||
@ -206,7 +206,7 @@ pub fn (mut zentry Zip) read_entry() ?voidptr {
|
||||
|
||||
// read_entry_buf extracts the current zip entry into user specified buffer
|
||||
pub fn (mut zentry Zip) read_entry_buf(buf voidptr, in_bsize int) ?int {
|
||||
bsize := size_t(in_bsize)
|
||||
bsize := usize(in_bsize)
|
||||
res := C.zip_entry_noallocread(zentry, buf, bsize)
|
||||
if res == -1 {
|
||||
return error('szip: cannot read properly data from entry')
|
||||
|
Reference in New Issue
Block a user