fixes from last merge of main

This commit is contained in:
Brendan Hansknecht 2024-12-11 16:47:19 -08:00
parent 4d7a6f1792
commit 4bad31f1ac
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -376,12 +376,12 @@ pub fn exportAddSaturatedInt(comptime T: type, comptime name: []const u8) void {
}
pub fn exportAddWrappedInt(comptime T: type, comptime name: []const u8) void {
comptime var f = struct {
const f = struct {
fn func(self: T, other: T) callconv(.C) T {
return self +% other;
}
}.func;
@export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong });
@export(f, .{ .name = name ++ @typeName(T), .linkage = .strong });
}
pub fn exportAddOrPanic(comptime T: type, comptime name: []const u8) void {
@ -442,12 +442,12 @@ pub fn exportSubSaturatedInt(comptime T: type, comptime name: []const u8) void {
}
pub fn exportSubWrappedInt(comptime T: type, comptime name: []const u8) void {
comptime var f = struct {
const f = struct {
fn func(self: T, other: T) callconv(.C) T {
return self -% other;
}
}.func;
@export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong });
@export(f, .{ .name = name ++ @typeName(T), .linkage = .strong });
}
pub fn exportSubOrPanic(comptime T: type, comptime name: []const u8) void {