Skip to content

Lightpanda: the headless browser designed for AI and automation

`Network`: mark `globalInit` and `globalDeinit` as `pub`

Halil Durakb97ca18dcbfe
diff --git a/src/network/Network.zig b/src/network/Network.zig
index f637c872d..842ef9113 100644
--- a/src/network/Network.zig
+++ b/src/network/Network.zig
@@ -138,7 +138,9 @@ cdp_start: usize,
/// Optional IP filter for blocking requests to private/internal networks (--block-private-networks).
ip_filter: ?*IpFilter = null,
-fn globalInit(allocator: Allocator) void {
+/// Calling `init` also calls this function; only marked public for situations
+/// networking is needed without `App`.
+pub fn globalInit(allocator: Allocator) void {
// Only route curl's own allocations through our allocator in Debug, so the
// leak detector sees them. In Release it'd just wrap c_allocator (curl's
// default malloc anyway) at the cost of a per-allocation header.
@@ -152,7 +154,9 @@ fn globalInit(allocator: Allocator) void {
};
}
-fn globalDeinit() void {
+/// Calling `deinit` also calls this function; only marked public for situations
+/// networking is needed without `App`.
+pub fn globalDeinit() void {
libcurl.curl_global_cleanup();
}