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:
@@ -221,7 +221,7 @@ pub fn (mut f File) writeln(s string) ?int {
|
||||
// write_string writes the string `s` into the file
|
||||
// It returns how many bytes were actually written.
|
||||
pub fn (mut f File) write_string(s string) ?int {
|
||||
unsafe { f.write_full_buffer(s.str, size_t(s.len)) ? }
|
||||
unsafe { f.write_full_buffer(s.str, usize(s.len)) ? }
|
||||
return s.len
|
||||
}
|
||||
|
||||
@@ -274,8 +274,8 @@ pub fn (mut f File) write_ptr(data voidptr, size int) int {
|
||||
// write_full_buffer writes a whole buffer of data to the file, starting from the
|
||||
// address in `buffer`, no matter how many tries/partial writes it would take.
|
||||
[unsafe]
|
||||
pub fn (mut f File) write_full_buffer(buffer voidptr, buffer_len size_t) ? {
|
||||
if buffer_len <= size_t(0) {
|
||||
pub fn (mut f File) write_full_buffer(buffer voidptr, buffer_len usize) ? {
|
||||
if buffer_len <= usize(0) {
|
||||
return
|
||||
}
|
||||
if !f.is_opened {
|
||||
|
||||
Reference in New Issue
Block a user