mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-02 05:48:17 +00:00
fixes from last merge of main
This commit is contained in:
parent
4d7a6f1792
commit
4bad31f1ac
1 changed files with 4 additions and 4 deletions
|
|
@ -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 {
|
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 {
|
fn func(self: T, other: T) callconv(.C) T {
|
||||||
return self +% other;
|
return self +% other;
|
||||||
}
|
}
|
||||||
}.func;
|
}.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 {
|
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 {
|
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 {
|
fn func(self: T, other: T) callconv(.C) T {
|
||||||
return self -% other;
|
return self -% other;
|
||||||
}
|
}
|
||||||
}.func;
|
}.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 {
|
pub fn exportSubOrPanic(comptime T: type, comptime name: []const u8) void {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue