Skip to content

Commit

Permalink
revert: "tmp: partial revert comptime generic change in setop to chec…
Browse files Browse the repository at this point in the history
…k compilation errors with cstrict"

- cast to &char

This reverts commit 2fda658.
  • Loading branch information
ttytm committed Nov 11, 2024
1 parent 2fda658 commit 0c679fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion curl/instructions/easy.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ pub fn easy_strerror(err_code state.Ecode) string {
}

pub fn easy_setopt[T](handle &C.CURL, option state.Opt, parameter T) state.Ecode {
return ecode(C.curl_easy_setopt(handle, int(option), parameter))
$if T is string {
return ecode(C.curl_easy_setopt(handle, int(option), &char(parameter.str)))
} $else {
return ecode(C.curl_easy_setopt(handle, int(option), parameter))
}
}

pub fn easy_perform(handle &C.CURL) state.Ecode {
Expand Down

0 comments on commit 0c679fd

Please sign in to comment.