Replace "preferred int type" with intptr_t
This commit is contained in:
parent
d6a4029dde
commit
b35ab48437
|
@ -1293,7 +1293,7 @@ static int num_to_ptr(value_t a, fixnum_t *pi, numerictype_t *pt, void **pp)
|
|||
*/
|
||||
int numeric_compare(value_t a, value_t b, int eq, int eqnans, char *fname)
|
||||
{
|
||||
int_t ai, bi;
|
||||
intptr_t ai, bi;
|
||||
numerictype_t ta, tb;
|
||||
void *aptr, *bptr;
|
||||
|
||||
|
@ -1336,7 +1336,7 @@ static void DivideByZeroError(void)
|
|||
static value_t fl_div2(value_t a, value_t b)
|
||||
{
|
||||
double da, db;
|
||||
int_t ai, bi;
|
||||
intptr_t ai, bi;
|
||||
numerictype_t ta, tb;
|
||||
void *aptr, *bptr;
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ static value_t fl_div2(value_t a, value_t b)
|
|||
|
||||
static value_t fl_idiv2(value_t a, value_t b)
|
||||
{
|
||||
int_t ai, bi;
|
||||
intptr_t ai, bi;
|
||||
numerictype_t ta, tb;
|
||||
void *aptr, *bptr;
|
||||
int64_t a64, b64;
|
||||
|
@ -1407,7 +1407,7 @@ div_error:
|
|||
|
||||
static value_t fl_bitwise_op(value_t a, value_t b, int opcode, char *fname)
|
||||
{
|
||||
int_t ai, bi;
|
||||
intptr_t ai, bi;
|
||||
numerictype_t ta, tb, itmp;
|
||||
void *aptr = NULL, *bptr = NULL, *ptmp;
|
||||
int64_t b64;
|
||||
|
|
|
@ -104,8 +104,6 @@ typedef int bool_t;
|
|||
#ifdef BITS64
|
||||
#define TOP_BIT 0x8000000000000000
|
||||
#define NBITS 64
|
||||
typedef unsigned long uint_t; // preferred int type on platform
|
||||
typedef long int_t;
|
||||
typedef int64_t offset_t;
|
||||
typedef uint64_t index_t;
|
||||
typedef int64_t ptrint_t; // pointer-size int
|
||||
|
@ -113,8 +111,6 @@ typedef uint64_t u_ptrint_t;
|
|||
#else
|
||||
#define TOP_BIT 0x80000000
|
||||
#define NBITS 32
|
||||
typedef unsigned long uint_t;
|
||||
typedef long int_t;
|
||||
typedef int32_t offset_t;
|
||||
typedef uint32_t index_t;
|
||||
typedef int32_t ptrint_t;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
typedef uptrint_t value_t;
|
||||
typedef int_t fixnum_t;
|
||||
typedef uint_t ufixnum_t;
|
||||
typedef intptr_t fixnum_t;
|
||||
typedef uintptr_t ufixnum_t;
|
||||
#ifdef BITS64
|
||||
#define T_FIXNUM T_INT64
|
||||
#else
|
||||
|
|
|
@ -27,7 +27,7 @@ typedef unsigned short uint16_t;
|
|||
#include "ios.h"
|
||||
#include "random.h"
|
||||
|
||||
uint_t nextipow2(uint_t i)
|
||||
uintptr_t nextipow2(uintptr_t i)
|
||||
{
|
||||
if (i == 0)
|
||||
return 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
uint_t nextipow2(uint_t i);
|
||||
uintptr_t nextipow2(uintptr_t i);
|
||||
uint32_t int32hash(uint32_t a);
|
||||
uint64_t int64hash(uint64_t key);
|
||||
uint32_t int64to32hash(uint64_t key);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define HTIMPL(HTNAME, HFUNC, EQFUNC) \
|
||||
static void **HTNAME##_lookup_bp(struct htable *h, void *key) \
|
||||
{ \
|
||||
uint_t hv; \
|
||||
uintptr_t hv; \
|
||||
size_t i, orig, index, iter; \
|
||||
size_t newsz, sz = hash_size(h); \
|
||||
size_t maxprobe = max_probe(sz); \
|
||||
|
|
Loading…
Reference in New Issue