mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
use a nullable pointer to store the output of strSplitInPlace
This commit is contained in:
parent
5a3be2adf4
commit
e94bdb0ed8
1 changed files with 6 additions and 2 deletions
|
@ -512,8 +512,12 @@ fn strFromFloatHelp(comptime T: type, float: T) RocStr {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Str.split
|
// Str.split
|
||||||
pub fn strSplitInPlaceC(array: [*]RocStr, string: RocStr, delimiter: RocStr) callconv(.C) void {
|
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 });
|
return @call(.{ .modifier = always_inline }, strSplitInPlace, .{ array, string, delimiter });
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn strSplitInPlace(array: [*]RocStr, string: RocStr, delimiter: RocStr) void {
|
fn strSplitInPlace(array: [*]RocStr, string: RocStr, delimiter: RocStr) void {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue