Skip to content

Commit

Permalink
fix: compilation with -cstrict
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 21, 2023
1 parent 5e4ca42 commit b795e7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion curl/lib.v
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn easy_strerror(err_code Ecode) string {
}

pub fn slist_append(list &LinkedList, item string) &LinkedList {
return C.curl_slist_append(list, item.str)
return C.curl_slist_append(list, &char(item.str))
}

pub fn slist_free_all(list &LinkedList) {
Expand Down
4 changes: 2 additions & 2 deletions src/_instructions_get.v
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ fn (req Request) get_slice_(url string, start usize, max_size_ ?usize) !Response

resp.get_http_version()!
resp.status = Status(status_code)
if start < resp.header.len {
if start < usize(resp.header.len) {
resp.body = resp.body[resp.header.len - int(start)..]
}
// If the last chunk was bigger than max_size, truncate it
if resp.body.len > max_size {
if max_size < usize(resp.body.len) {
resp.body = resp.body[..max_size]
}

Expand Down

0 comments on commit b795e7a

Please # to comment.