From 4116d1e831debb15f7b1de2c10d812fb5555dd48 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 24 Sep 2020 07:22:30 -0700 Subject: [PATCH] Interop typealiases --- BeefLibs/corlib/src/Interop.bf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 BeefLibs/corlib/src/Interop.bf diff --git a/BeefLibs/corlib/src/Interop.bf b/BeefLibs/corlib/src/Interop.bf new file mode 100644 index 00000000..9871330d --- /dev/null +++ b/BeefLibs/corlib/src/Interop.bf @@ -0,0 +1,26 @@ +namespace System +{ + namespace Interop + { + typealias c_short = int16; + typealias c_ushort = uint16; + typealias c_int = int32; + typealias c_uint = uint32; + typealias c_longlong = int64; + typealias c_ulonglong = uint64; + typealias c_intptr = int; + typealias c_uintptr = uint; + typealias c_char = char8; + typealias c_uchar = uint8; + +#if BF_PLATFORM_WINDOWS + typealias c_long = int32; + typealias c_ulong = uint32; + typealias c_wchar = char16; +#else + typealias c_long = int64; + typealias c_ulong = uint64; + typealias c_wchar = char32; +#endif + } +}