From 8bdd649d523f949ae6888980d1f69e19ef3710d5 Mon Sep 17 00:00:00 2001 From: tsai Date: Sun, 28 Apr 2024 11:54:09 +0800 Subject: [PATCH] fix extra_nifs size --- src/kinda.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kinda.zig b/src/kinda.zig index 1283ac8..eb96ee9 100644 --- a/src/kinda.zig +++ b/src/kinda.zig @@ -154,7 +154,7 @@ pub fn ResourceKind(comptime ElementType: type, comptime module_name_: anytype) ElementType.nifs else .{}; - pub const nifs: [numOfNIFsPerKind]e.ErlNifFunc = .{ + pub const nifs: [numOfNIFsPerKind + @typeInfo(@TypeOf(extra_nifs)).Struct.fields.len]e.ErlNifFunc = .{ result.nif(module_name ++ ".ptr", 1, ptr_maker).entry, result.nif(module_name ++ ".ptr_to_opaque", 1, ptr_to_opaque).entry, result.nif(module_name ++ ".opaque_ptr", 1, opaque_ptr).entry,