diff --git a/c/bitvector-ops.c b/c/bitvector-ops.c index 8365851..b59f20a 100644 --- a/c/bitvector-ops.c +++ b/c/bitvector-ops.c @@ -133,7 +133,7 @@ void bitvector_shl_to(uint32_t *dest, uint32_t *b, size_t n, uint32_t s, // assumes offs < 32 void bitvector_fill(uint32_t *b, uint32_t offs, uint32_t c, uint32_t nbits) { - index_t i; + uintptr_t i; uint32_t nw, tail; uint32_t mask; @@ -177,7 +177,7 @@ void bitvector_fill(uint32_t *b, uint32_t offs, uint32_t c, uint32_t nbits) void bitvector_not(uint32_t *b, uint32_t offs, uint32_t nbits) { - index_t i; + uintptr_t i; uint32_t nw, tail; uint32_t mask; @@ -212,7 +212,7 @@ void bitvector_not(uint32_t *b, uint32_t offs, uint32_t nbits) void bitvector_##name(uint32_t *dest, uint32_t doffs, uint32_t *src, \ uint32_t soffs, uint32_t nbits) \ { \ - index_t i; \ + uintptr_t i; \ uint32_t s, nw, tail, snw; \ uint32_t mask, scrap; \ \ @@ -331,7 +331,7 @@ s) void bitvector_reverse_to(uint32_t *dest, uint32_t *src, uint32_t soffs, uint32_t nbits) { - index_t i; + uintptr_t i; uint32_t nw, tail; if (nbits == 0) @@ -353,7 +353,7 @@ void bitvector_reverse_to(uint32_t *dest, uint32_t *src, uint32_t soffs, void bitvector_reverse(uint32_t *b, uint32_t offs, uint32_t nbits) { - index_t i; + uintptr_t i; uint32_t nw, tail; uint32_t *temp; @@ -414,7 +414,7 @@ uint64_t bitvector_count(uint32_t *b, uint32_t offs, uint64_t nbits) uint32_t bitvector_any0(uint32_t *b, uint32_t offs, uint32_t nbits) { - index_t i; + uintptr_t i; uint32_t nw, tail; uint32_t mask; @@ -452,7 +452,7 @@ uint32_t bitvector_any0(uint32_t *b, uint32_t offs, uint32_t nbits) uint32_t bitvector_any1(uint32_t *b, uint32_t offs, uint32_t nbits) { - index_t i; + uintptr_t i; uint32_t nw, tail; uint32_t mask; diff --git a/c/dtypes.h b/c/dtypes.h index 53b6845..6d81908 100644 --- a/c/dtypes.h +++ b/c/dtypes.h @@ -104,11 +104,9 @@ typedef int bool_t; #ifdef BITS64 #define TOP_BIT 0x8000000000000000 #define NBITS 64 -typedef uint64_t index_t; #else #define TOP_BIT 0x80000000 #define NBITS 32 -typedef uint32_t index_t; #endif #define LLT_ALIGN(x, sz) (((x) + (sz - 1)) & (-sz)) diff --git a/c/htable_inc.h b/c/htable_inc.h index 12c6c53..0cb37ef 100644 --- a/c/htable_inc.h +++ b/c/htable_inc.h @@ -23,7 +23,7 @@ hv = HFUNC((uintptr_t)key); \ retry_bp: \ iter = 0; \ - index = (index_t)(hv & (sz - 1)) * 2; \ + index = (uintptr_t)(hv & (sz - 1)) * 2; \ sz *= 2; \ orig = index; \ \ @@ -99,7 +99,7 @@ size_t sz = hash_size(h); \ size_t maxprobe = max_probe(sz); \ void **tab = h->table; \ - size_t index = (index_t)(HFUNC((uintptr_t)key) & (sz - 1)) * 2; \ + size_t index = (uintptr_t)(HFUNC((uintptr_t)key) & (sz - 1)) * 2; \ sz *= 2; \ size_t orig = index; \ size_t iter = 0; \