@@ -29,10 +29,6 @@ using LibCURL
2929using LibCURL: curl_off_t
3030# not exported: https://github.com/JuliaWeb/LibCURL.jl/issues/87
3131
32- # constants that LibCURL should have but doesn't
33- const CURLE_PEER_FAILED_VERIFICATION = 60
34- const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3
35-
3632using NetworkOptions
3733using Base: preserve_handle, unpreserve_handle
3834
@@ -68,8 +64,14 @@ function with_handle(f, handle::Union{Multi, Easy})
6864end
6965
7066setopt (easy:: Easy , option:: Integer , value) =
71- @check curl_easy_setopt (easy. handle, option, value)
67+ @check curl_easy_setopt (easy. handle, CURLoption ( option) , value)
7268setopt (multi:: Multi , option:: Integer , value) =
73- @check curl_multi_setopt (multi. handle, option, value)
69+ @check curl_multi_setopt (multi. handle, CURLMoption (option), value)
70+
71+ # CEnum is no longer Integer in LibCURL.jl
72+ setopt (easy:: Easy , option:: CURLoption , value) = setopt (easy, Int (option), value)
73+ setopt (multi:: Multi , option:: CURLMoption , value) = setopt (multi, Int (option), value)
74+ Base. zero (:: CURLcode ) = CURLE_OK
75+ Base. zero (:: CURLMcode ) = CURLM_OK
7476
7577end # module
0 commit comments