some zig functions need to accept arguments by-pointer now

because otherwise stores to alloca's disappear. Very odd
This commit is contained in:
Folkert 2022-03-13 00:07:32 +01:00
parent f66b111c7a
commit fcb34272da
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -443,8 +443,8 @@ pub fn init(bytes_ptr: [*]const u8, length: usize) callconv(.C) RocStr {
}
// Str.equal
pub fn strEqual(self: RocStr, other: RocStr) callconv(.C) bool {
return self.eq(other);
pub fn strEqual(self: *RocStr, other: *RocStr) callconv(.C) bool {
return self.eq(other.*);
}
// Str.numberOfBytes
@ -837,7 +837,7 @@ test "countSegments: delimiter interspered" {
// Str.countGraphemeClusters
const grapheme = @import("helpers/grapheme.zig");
pub fn countGraphemeClusters(string: RocStr) callconv(.C) usize {
pub fn countGraphemeClusters(string: *RocStr) callconv(.C) usize {
if (string.isEmpty()) {
return 0;
}