From e011e342420fe1f1f5d2fee932447b194f989032 Mon Sep 17 00:00:00 2001 From: Tesseract22 Date: Sat, 9 Aug 2025 18:57:19 +0800 Subject: chore: update to zig 0.15 Everything other than loadextension works. zig 0.15 remove usingnamespac, so tha whole mechanism has to be reworked, and idk how --- examples/zigcrypto.zig | 2 +- examples/zigcrypto_test.zig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/zigcrypto.zig b/examples/zigcrypto.zig index 05c44a5..9489df1 100644 --- a/examples/zigcrypto.zig +++ b/examples/zigcrypto.zig @@ -39,7 +39,7 @@ fn createAllFunctions(db: *sqlite.Db) !void { ); } -pub export fn sqlite3_zigcrypto_init(raw_db: *c.sqlite3, err_msg: [*c][*c]u8, api: *c.sqlite3_api_routines) callconv(.C) c_int { +pub export fn sqlite3_zigcrypto_init(raw_db: *c.sqlite3, err_msg: [*c][*c]u8, api: *c.sqlite3_api_routines) callconv(.c) c_int { _ = err_msg; c.sqlite3_api = api; diff --git a/examples/zigcrypto_test.zig b/examples/zigcrypto_test.zig index 9340f99..5922d8d 100644 --- a/examples/zigcrypto_test.zig +++ b/examples/zigcrypto_test.zig @@ -41,14 +41,14 @@ pub fn main() anyerror!void { var diags = sqlite.Diagnostics{}; const blake3_digest = db.oneAlloc([]const u8, allocator, "SELECT hex(blake3('foobar'))", .{ .diags = &diags }, .{}) catch |err| { - debug.print("unable to get blake3 hash, err: {!}, diags: {s}\n", .{ err, diags }); + debug.print("unable to get blake3 hash, err: {}, diags: {f}\n", .{ err, diags }); return err; }; debug.assert(blake3_digest != null); debug.assert(mem.eql(u8, "AA51DCD43D5C6C5203EE16906FD6B35DB298B9B2E1DE3FCE81811D4806B76B7D", blake3_digest.?)); const sha3_digest = db.oneAlloc([]const u8, allocator, "SELECT hex(sha3_512('foobar'))", .{ .diags = &diags }, .{}) catch |err| { - debug.print("unable to get sha3 hash, err: {!}, diags: {s}\n", .{ err, diags }); + debug.print("unable to get sha3 hash, err: {}, diags: {f}\n", .{ err, diags }); return err; }; debug.assert(sha3_digest != null); -- cgit v1.2.3