41 Value vurl = pop_value(vm);
52 FILE *
fp = fopen(
path,
"wb");
59 CURL *h = curl_easy_init();
67 curl_easy_setopt(h, CURLOPT_URL, url);
68 curl_easy_setopt(h, CURLOPT_FOLLOWLOCATION, 1L);
69 curl_easy_setopt(h, CURLOPT_WRITEFUNCTION, fun_curl_file_write_cb);
70 curl_easy_setopt(h, CURLOPT_WRITEDATA,
fp);
71 CURLcode
rc = curl_easy_perform(h);
push_value(vm, make_int(0))
Tagged union representing a Fun value.
char * value_to_string_alloc(const Value *v)
Allocate a printable C string for a Value.
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.