aboutsummaryrefslogtreecommitdiff
path: root/src/wrapper/curl.nim
diff options
context:
space:
mode:
authorshirleyquirk2020-08-04 23:54:04 +0000
committerGitHub2020-08-04 23:54:04 +0000
commit22799b2e439d6b74ca648060faa1e3f1ee13f946 (patch)
tree512a18c53d4e7e6878ea134a2a307e3caec2278d /src/wrapper/curl.nim
parentb2321b0ded6f4a9803daf9dbcbd88d56321a9305 (diff)
parent731f8d7692bfe08f5fd5890a98797f9b1b8d065d (diff)
Merge pull request #1 from shirleyquirk/collect
Collect
Diffstat (limited to 'src/wrapper/curl.nim')
-rw-r--r--src/wrapper/curl.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wrapper/curl.nim b/src/wrapper/curl.nim
index 5597ef1..149f0a3 100644
--- a/src/wrapper/curl.nim
+++ b/src/wrapper/curl.nim
@@ -58,8 +58,9 @@ proc escape*(instance: ref CurlInstance, s: string): string =
else:
""
-proc curlWriteMemory(mem: array[int.high, char], size: int, nmemb: int,
- userdata: ref CurlInstance): int {.cdecl.} =
+proc curlWriteMemory(mem: array[csize_t.high, char], size: csize_t, nmemb: csize_t,
+ userdata: ref CurlInstance): csize_t {.cdecl.} =
+
let total = size * nmemb
if total > 0:
userData.data &= mem[0 .. total - 1]