mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
upgrade zig bultins to zig 13
This commit is contained in:
parent
c08202507b
commit
c47915a691
2 changed files with 2 additions and 9 deletions
|
@ -1,7 +0,0 @@
|
|||
// This is a glue package that just re-exports other libs useful for zig hosts.
|
||||
// Long term, a slimmed down version of these libraries without all of the roc builtins should be create via `roc glue`.
|
||||
// We also should make RocList use comptime types in order to make it nice to use in zig.
|
||||
|
||||
pub const dec = @import("dec.zig");
|
||||
pub const list = @import("list.zig");
|
||||
pub const str = @import("str.zig");
|
|
@ -652,7 +652,7 @@ pub fn listDropAt(
|
|||
}
|
||||
|
||||
if (list.isUnique()) {
|
||||
var i = drop_index;
|
||||
const i = drop_index;
|
||||
const copy_target = source_ptr;
|
||||
const copy_source = copy_target + element_width;
|
||||
std.mem.copyForwards(u8, copy_target[i..size], copy_source[i..size]);
|
||||
|
@ -982,7 +982,7 @@ inline fn listReplaceInPlaceHelp(
|
|||
copy: CopyFn,
|
||||
) RocList {
|
||||
// the element we will replace
|
||||
var element_at_index = (list.bytes orelse unreachable) + (index * element_width);
|
||||
const element_at_index = (list.bytes orelse unreachable) + (index * element_width);
|
||||
|
||||
// copy out the old element
|
||||
copy((out_element orelse unreachable), element_at_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue