@@ -29,10 +29,6 @@ using LibCURL
29
29
using LibCURL: curl_off_t
30
30
# not exported: https://github.com/JuliaWeb/LibCURL.jl/issues/87
31
31
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
-
36
32
using NetworkOptions
37
33
using Base: preserve_handle, unpreserve_handle
38
34
@@ -68,8 +64,14 @@ function with_handle(f, handle::Union{Multi, Easy})
68
64
end
69
65
70
66
setopt (easy:: Easy , option:: Integer , value) =
71
- @check curl_easy_setopt (easy. handle, option, value)
67
+ @check curl_easy_setopt (easy. handle, CURLoption ( option) , value)
72
68
setopt (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
74
76
75
77
end # module
0 commit comments