-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init multiple part * add mp in request * refactor mp * add data_cb comments
- Loading branch information
1 parent
a7a93ea
commit 1d7daca
Showing
7 changed files
with
156 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
const std = @import("std"); | ||
const c = @import("c.zig").c; | ||
const checkCode = @import("errors.zig").checkCode; | ||
|
||
pub const Easy = @import("easy.zig"); | ||
pub usingnamespace Easy; | ||
|
||
pub const print_libcurl_version = @import("c.zig").print_libcurl_version; | ||
pub const has_parse_header_support = @import("c.zig").has_parse_header_support; | ||
pub usingnamespace @import("c.zig"); | ||
|
||
/// This function sets up the program environment that libcurl needs. | ||
/// Since this function is not thread safe before libcurl 7.84.0, this function | ||
/// must be called before the program calls any other function in libcurl. | ||
/// A common place is in the beginning of the program. More see: | ||
/// https://curl.se/libcurl/c/curl_global_init.html | ||
pub fn global_init() !void { | ||
checkCode(c.curl_global_init(c.CURL_GLOBAL_ALL)); | ||
try checkCode(c.curl_global_init(c.CURL_GLOBAL_ALL)); | ||
} | ||
|
||
/// This function releases resources acquired by curl_global_init. | ||
pub fn global_deinit() void { | ||
c.curl_global_cleanup(); | ||
} | ||
|
||
test { | ||
std.testing.refAllDecls(@This()); | ||
} |