mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
add lowlevel to inc/dec a data pointer
This commit is contained in:
parent
a61e7a696d
commit
cf54304cf4
13 changed files with 90 additions and 28 deletions
|
@ -974,7 +974,7 @@ test "listConcat: non-unique with unique overlapping" {
|
|||
var bytes: [*]u8 = @ptrCast([*]u8, nonUnique.bytes);
|
||||
const ptr_width = @sizeOf(usize);
|
||||
const refcount_ptr = @ptrCast([*]isize, @alignCast(ptr_width, bytes) - ptr_width);
|
||||
utils.increfC(&refcount_ptr[0], 1);
|
||||
utils.increfRcPtrC(&refcount_ptr[0], 1);
|
||||
defer nonUnique.decref(@sizeOf(u8)); // listConcat will dec the other refcount
|
||||
|
||||
var unique = RocList.fromSlice(u8, ([_]u8{ 2, 3, 4 })[0..]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue