From 7a2cb284751daeae6649084706181696e74f2b01 Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 20 Dec 2022 17:12:44 +0100 Subject: [PATCH] Make sure isize matches ssize_t on most cases --- luna/include/luna/Types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luna/include/luna/Types.h b/luna/include/luna/Types.h index 0abcefa7..f75bb652 100644 --- a/luna/include/luna/Types.h +++ b/luna/include/luna/Types.h @@ -10,7 +10,7 @@ typedef int16_t i16; typedef int32_t i32; typedef int64_t i64; typedef size_t usize; -typedef int64_t isize; +typedef intptr_t isize; static_assert(sizeof(u8) == 1UL); static_assert(sizeof(u16) == 2UL); @@ -21,5 +21,5 @@ static_assert(sizeof(i16) == 2UL); static_assert(sizeof(i32) == 4UL); static_assert(sizeof(i64) == 8UL); -static_assert(sizeof(usize) == 8UL); -static_assert(sizeof(isize) == 8UL); \ No newline at end of file +static_assert(sizeof(usize) == sizeof(void*)); +static_assert(sizeof(isize) == sizeof(void*)); \ No newline at end of file