mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Increment the counter if data is owned
This commit is contained in:
parent
87894578cf
commit
d6e98c08ec
1 changed files with 5 additions and 1 deletions
|
@ -1088,9 +1088,13 @@ pub fn listAny(
|
|||
) callconv(.C) bool {
|
||||
if (list.bytes) |source_ptr| {
|
||||
const size = list.len();
|
||||
|
||||
if (data_is_owned) {
|
||||
inc_n_data(data, size);
|
||||
}
|
||||
|
||||
var i: usize = 0;
|
||||
var satisfied = false;
|
||||
|
||||
while (i < size) : (i += 1) {
|
||||
const element = source_ptr + i * element_width;
|
||||
caller(data, element, @ptrCast(?[*]u8, &satisfied));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue