From 4236519b84e2bea73b1b7756a20a2df24d3fb070 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sun, 18 Jun 2017 14:36:06 +0100 Subject: `#location(..)` and `#call_location` --- src/integer128.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/integer128.cpp') diff --git a/src/integer128.cpp b/src/integer128.cpp index 3ebd811c6..58a21d6d7 100644 --- a/src/integer128.cpp +++ b/src/integer128.cpp @@ -152,7 +152,12 @@ u64 bit128__digit_value(Rune r) { return 16; // NOTE(bill): Larger than highest possible } -u128 u128_lo_hi(u64 lo, u64 hi) { return u128{lo, hi}; } +u128 u128_lo_hi(u64 lo, u64 hi) { + u128 r = {}; + r.lo = lo; + r.hi = hi; + return r; +} u128 u128_from_u32(u32 u) { return u128_lo_hi(cast(u64)u, 0); } u128 u128_from_u64(u64 u) { return u128_lo_hi(cast(u64)u, 0); } u128 u128_from_i64(i64 u) { return u128_lo_hi(cast(u64)u, u < 0 ? -1 : 0); } -- cgit v1.2.3