Use alignOf instead of sizeOf

This commit is contained in:
Richard Feldman 2022-07-01 17:25:57 -04:00
parent 47216b9905
commit 6f5baa5021
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798

View file

@ -183,7 +183,7 @@ pub fn decref(
var bytes = bytes_or_null orelse return;
const isizes: [*]isize = @ptrCast([*]isize, @alignCast(@sizeOf(isize), bytes));
const isizes: [*]isize = @ptrCast([*]isize, @alignCast(@alignOf(isize), bytes));
decref_ptr_to_refcount(isizes - 1, alignment);
}