mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
use a nullable pointer to store the output of strSplitInPlace
This commit is contained in:
parent
fd209f90ff
commit
d49ee97216
1 changed files with 6 additions and 2 deletions
|
@ -491,8 +491,12 @@ fn strFromFloatHelp(comptime T: type, float: T) RocStr {
|
|||
}
|
||||
|
||||
// Str.split
|
||||
pub fn strSplitInPlaceC(array: [*]RocStr, string: RocStr, delimiter: RocStr) callconv(.C) void {
|
||||
return @call(.{ .modifier = always_inline }, strSplitInPlace, .{ array, string, delimiter });
|
||||
pub fn strSplitInPlaceC(opt_array: ?[*]RocStr, string: RocStr, delimiter: RocStr) callconv(.C) void {
|
||||
if (opt_array) |array| {
|
||||
return @call(.{ .modifier = always_inline }, strSplitInPlace, .{ array, string, delimiter });
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fn strSplitInPlace(array: [*]RocStr, string: RocStr, delimiter: RocStr) void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue