Update crates/roc_std/src/roc_box.rs

This commit is contained in:
Dan Gieschen Knutson 2024-11-30 13:04:41 -06:00 committed by Dan Knutson
parent dccc0f68da
commit 1036695b77
No known key found for this signature in database
GPG key ID: D97DA800148D5B08

View file

@ -76,7 +76,7 @@ where
/// The raw pointer to a roc box, including the leading refcount
/// Intended for use by platforms in roc_dealloc
pub unsafe fn as_ptr(&self) -> *mut c_void {
pub unsafe fn as_refcount_ptr(&self) -> *mut c_void {
let alignment = Self::alloc_alignment();
let with_offset = unsafe { self.contents.as_ptr().cast::<u8>().sub(alignment) };
with_offset as *mut c_void