mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
destruct record at high level
This commit is contained in:
parent
98d2c57edf
commit
2e073d57ea
5 changed files with 42 additions and 18 deletions
|
@ -893,11 +893,10 @@ pub fn listSublist(
|
|||
list: RocList,
|
||||
alignment: u32,
|
||||
element_width: usize,
|
||||
rec: extern struct { len: usize, start: usize },
|
||||
start: usize,
|
||||
len: usize,
|
||||
dec: Dec,
|
||||
) callconv(.C) RocList {
|
||||
const start = rec.start;
|
||||
const len = rec.len;
|
||||
if (list.bytes) |source_ptr| {
|
||||
const size = list.len();
|
||||
|
||||
|
@ -922,9 +921,9 @@ pub fn listSublist(
|
|||
utils.decref(list.bytes, size * element_width, alignment);
|
||||
|
||||
return output;
|
||||
} else {
|
||||
return RocList.empty();
|
||||
}
|
||||
}
|
||||
|
||||
return RocList.empty();
|
||||
}
|
||||
|
||||
pub fn listTakeLast(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue