diff options
| author | gingerBill <bill@gingerbill.org> | 2020-03-05 20:34:30 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-03-05 20:34:30 +0000 |
| commit | e92fdb4a99bf9d27009dd35fdd074ff14facfc03 (patch) | |
| tree | e74c13d12da216f2548db0a8359e491263dc6acd /core/c | |
| parent | 2fe0eaf2adf952867d4ce4fba53b4b3ac75e1ba5 (diff) | |
`x if cond else y` and `x when cond else y` expressions
Diffstat (limited to 'core/c')
| -rw-r--r-- | core/c/c.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/c/c.odin b/core/c/c.odin index 3ed49c0c2..757abcac9 100644 --- a/core/c/c.odin +++ b/core/c/c.odin @@ -14,8 +14,8 @@ ushort :: b.u16; int :: b.i32; uint :: b.u32; -long :: (ODIN_OS == "windows" || size_of(b.rawptr) == 4) ? b.i32 : b.i64; -ulong :: (ODIN_OS == "windows" || size_of(b.rawptr) == 4) ? b.u32 : b.u64; +long :: b.i32 when (ODIN_OS == "windows" || size_of(b.rawptr) == 4) else b.i64; +ulong :: b.u32 when (ODIN_OS == "windows" || size_of(b.rawptr) == 4) else b.u64; longlong :: b.i64; ulonglong :: b.u64; @@ -32,4 +32,4 @@ ptrdiff_t :: b.int; uintptr_t :: b.uintptr; intptr_t :: b.int; -wchar_t :: (ODIN_OS == "windows") ? b.u16 : b.u32; +wchar_t :: b.u16 when (ODIN_OS == "windows") else b.u32; |