@@ -163,7 +163,7 @@ typedef enum {
163163
164164struct static_curl_exports_table {
165165 // Exports from curl.h
166- CURLversion CURLVERSION_NOW ;
166+ CURLversion (*curl_version_now)(void) ;
167167 curl_version_info_data* (*curl_version_info)(CURLversion);
168168 void (*curl_free)(void*);
169169
@@ -179,7 +179,7 @@ struct static_curl_exports_table {
179179 CURLUPart what,
180180 const char* part,
181181 unsigned int flags);
182- const char* (*curl_url_strerror)(CURLUcode errno );
182+ const char* (*curl_url_strerror)(CURLUcode status );
183183};
184184
185185]]
@@ -301,7 +301,7 @@ function curl.url_strerror(errorCode)
301301end
302302
303303function curl .version_info (age )
304- age = age or curl .bindings .CURLVERSION_NOW
304+ age = age or curl .bindings .curl_version_now ()
305305 local versionInfo = curl .bindings .curl_version_info (age )
306306
307307 local infoTable = {
@@ -340,9 +340,9 @@ function curl.version_info(age)
340340end
341341
342342function curl .version (age )
343- age = age or curl .bindings .CURLVERSION_NOW
343+ age = age or curl .bindings .curl_version_now ()
344344 local infoTable = curl .version_info (age )
345- return infoTable .version , infoTable .version_num , tonumber (curl .bindings .CURLVERSION_NOW )
345+ return infoTable .version , infoTable .version_num , tonumber (curl .bindings .curl_version_now () )
346346end
347347
348348return curl
0 commit comments