Working on casts
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
// a copy of which can be found in the LICENSE file.
|
||||
|
||||
struct Token;
|
||||
global S64 bigint_allocation_count;
|
||||
function void parsing_error(Token *token, const char *str, ...);
|
||||
#define malloc_arena(x) exp_alloc(&pernament_arena, x)
|
||||
#define malloc_arena(x) (bigint_allocation_count++, exp_alloc(&pernament_arena, x))
|
||||
#define ALLOC_DIGITS(_digits) (uint64_t *)((_digits) ? malloc_arena(sizeof(uint64_t) * (_digits)) : NULL)
|
||||
#define FATAL_ERROR(x) parsing_error(0, x)
|
||||
|
||||
@@ -18,7 +19,6 @@ struct BigInt
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#include <inttypes.h>
|
||||
enum CmpRes
|
||||
{
|
||||
@@ -74,14 +74,14 @@ size_t bigint_popcount_unsigned(const BigInt *big_int);
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
static BigInt
|
||||
function BigInt
|
||||
bigint_u64(U64 value){
|
||||
BigInt result;
|
||||
bigint_init_unsigned(&result, value);
|
||||
return result;
|
||||
}
|
||||
|
||||
static BigInt
|
||||
function BigInt
|
||||
bigint_s64(S64 value){
|
||||
BigInt result;
|
||||
bigint_init_signed(&result, value);
|
||||
|
||||
Reference in New Issue
Block a user