From 80ba1db819a80e784a488d6d660a890e14b19282 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Mar 2026 13:00:01 -0300 Subject: simple shock --- src/hooks.zig | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'src/hooks.zig') diff --git a/src/hooks.zig b/src/hooks.zig index 549d871..2fda734 100644 --- a/src/hooks.zig +++ b/src/hooks.zig @@ -7,35 +7,6 @@ pub const Kind = enum { const Self = @This(); pub const Hook = @This(); -// pub fn init(comptime kind: Kind, comptime alloc: std.mem.Allocator) type { -// return struct { -// alloc: std.mem.Allocator = alloc, - -// pub fn malloc(size: usize) callconv(.c) ?*anyopaque { -// if (kind == .breakpoint) @breakpoint(); -// return std.c.malloc(size); -// } - -// pub fn calloc(n: usize, size: usize) callconv(.c) ?*anyopaque { -// if (kind == .breakpoint) @breakpoint(); -// return std.c.calloc(n, size); -// } -// pub fn realloc(ptr: ?*anyopaque, size: usize) callconv(.c) ?*anyopaque { -// if (kind == .breakpoint) @breakpoint(); -// return std.c.realloc(ptr, size); -// } -// pub fn free(ptr: ?*anyopaque) callconv(.c) void { -// if (kind == .breakpoint) @breakpoint(); -// return std.c.free(ptr); -// } -// pub fn vsnprintf(_: [*c]u8, _: usize, _: [*c]const u8, _: [*c]u8) callconv(.c) ?*anyopaque { -// if (kind == .breakpoint) @breakpoint(); -// return null; -// } -// }; -// } -// - pub fn init(comptime kind: Kind, comptime alloc: std.mem.Allocator, comptime uselibc: bool) type { return struct { alloc: std.mem.Allocator = alloc, @@ -108,8 +79,7 @@ pub fn init(comptime kind: Kind, comptime alloc: std.mem.Allocator, comptime use } pub fn vsnprintf(_: [*c]u8, _: usize, _: [*c]const u8, _: [*c]u8) callconv(.c) ?*anyopaque { - if (kind == .breakpoint) @breakpoint(); - return null; + @compileError("Unimplemented!"); } }; } -- cgit v1.3