mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
expose decref_pointer_check_NULL
This commit is contained in:
parent
ac75badbe4
commit
5e68d31afc
4 changed files with 32 additions and 0 deletions
|
@ -117,6 +117,15 @@ pub fn decrefC(
|
|||
return @call(.{ .modifier = always_inline }, decref_ptr_to_refcount, .{ bytes, alignment });
|
||||
}
|
||||
|
||||
pub fn decrefCheckNullC(
|
||||
bytes_or_null: ?[*]isize,
|
||||
alignment: u32,
|
||||
) callconv(.C) void {
|
||||
if (bytes_or_null) |bytes| {
|
||||
return @call(.{ .modifier = always_inline }, decref_ptr_to_refcount, .{ bytes, alignment });
|
||||
}
|
||||
}
|
||||
|
||||
pub fn decref(
|
||||
bytes_or_null: ?[*]u8,
|
||||
data_bytes: usize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue