OSDN Git Service

こっそり、気持ち程度の日本語化しました (UTF-8 / Windows 環境用)。
[ring-lang-081/annotated-ring-with-OmegaT.git] / source / extensions / ringcurl / libcurl.ring
1 if iswindows()
2         LoadLib("ring_libcurl.dll")
3 but ismacosx()
4         LoadLib("libring_libcurl.dylib")
5 else
6         LoadLib("libring_libcurl.so")
7 ok
8
9 Load "ring_libcurl.rh"
10
11 func curl_easy_setopt p1,p2,p3
12         # Use CURLOPT_COPYPOSTFIELDS to avoid using deleted memory by LibCurl
13                 if p2 = CURLOPT_POSTFIELDS
14                         p2 = CURLOPT_COPYPOSTFIELDS
15                 ok
16         if isnumber(p3)
17                 curl_easy_setopt_1(p1,p2,p3)
18         but isstring(p3)
19                 curl_easy_setopt_2(p1,p2,p3)
20         but islist(p3)
21                 if type(p3) = "void"
22                         curl_easy_setopt_3(p1,p2,p3)
23                 else
24                         curl_easy_setopt_4(p1,p2,p3)
25                 ok
26         ok