This commit is contained in:
blueloveTH 2023-02-20 04:31:43 +08:00
parent af945293cd
commit 2d468311a8
2 changed files with 11 additions and 5 deletions

View File

@ -34,10 +34,19 @@
#define UNREACHABLE() throw std::runtime_error( __FILE__ + std::string(":") + std::to_string(__LINE__) + " UNREACHABLE()!");
#endif
#define PK_VERSION "0.8.8"
#define PK_VERSION "0.8.9"
#if defined(__EMSCRIPTEN__) || defined(PK_32_BIT)
typedef int32_t i64;
typedef float f64;
const i64 kMinSafeInt = -((i64)1 << 30);
const i64 kMaxSafeInt = ((i64)1 << 30) - 1;
#else
typedef int64_t i64;
typedef double f64;
const i64 kMinSafeInt = -((i64)1 << 62);
const i64 kMaxSafeInt = ((i64)1 << 62) - 1;
#endif
struct Dummy { char _; };
#define DUMMY_VAL Dummy()

View File

@ -142,7 +142,4 @@ union __8B {
f64 _float;
__8B(i64 val) : _int(val) {}
__8B(f64 val) : _float(val) {}
};
const i64 kMinSafeInt = -((i64)1 << 62);
const i64 kMaxSafeInt = ((i64)1 << 62) - 1;
};