From 4c4feef9fc3666403622b09d4cc9d4c94d60521f Mon Sep 17 00:00:00 2001 From: Halil Durak Date: Fri, 17 Oct 2025 15:48:28 +0300 Subject: [PATCH] add nullable ada url functions not fully sure how we should implement those; I believe we should move forward with nullable functions and put null-check logic outside of the wrappers --- vendor/ada/root.zig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vendor/ada/root.zig b/vendor/ada/root.zig index 56663133..1af8e823 100644 --- a/vendor/ada/root.zig +++ b/vendor/ada/root.zig @@ -63,6 +63,10 @@ pub inline fn getOrigin(url: URL) []const u8 { return origin.data[0..origin.length]; } +pub inline fn getOriginNullable(url: URL) OwnedString { + return c.ada_get_origin(url); +} + pub inline fn getHrefNullable(url: URL) String { return c.ada_get_href(url); } @@ -79,6 +83,10 @@ pub inline fn getPassword(url: URL) []const u8 { return password.data[0..password.length]; } +pub inline fn getPortNullable(url: URL) String { + return c.ada_get_port(url); +} + pub inline fn getPort(url: URL) []const u8 { if (!c.ada_has_port(url)) { return "";