CVaList support on MacOS aarch64.

This commit is contained in:
Christoffer Lerno
2025-09-09 01:05:20 +02:00
parent 3caaf0a3e8
commit 0d8f9520e9
2 changed files with 12 additions and 0 deletions

View File

@@ -59,3 +59,14 @@ macro typeid unsigned_int_from_bitsize(usz $bitsize) @private
$default: $error("Invalid bitsize");
$endswitch
}
module std::core::cinterop @if(env::MACOS && env::AARCH64);
typedef CVaList = void*;
macro CVaList.next(&self, $Type)
{
void *ptr = mem::aligned_pointer((void*)*self, max($Type.alignof, 8));
defer *self = (CVaList)(ptr + 1);
return *($Type*)ptr;
}

View File

@@ -26,6 +26,7 @@
`path::public_share_directory`, `path::templates_directory`, `path::saved_games_directory`, `path::music_directory`, `path::downloads_directory`.
- Add `LinkedList` array_view to support `[]` and `foreach`/`foreach_r`. #2438
- Make `LinkedList` printable and add `==` operator. #2438
- CVaList support on MacOS aarch64.
## 0.7.5 Change list