diff -r b0098854071f -r c773da859bad src/array_list.c --- a/src/array_list.c Sun Dec 15 15:23:29 2024 +0100 +++ b/src/array_list.c Sun Dec 15 15:41:18 2024 +0100 @@ -108,7 +108,7 @@ size_t oldcap; size_t oldsize; size_t max_size; - if (width == 0 || width == __WORDSIZE) { + if (width == 0 || width == CX_WORDSIZE) { oldcap = *(size_t*) capacity; oldsize = *(size_t*) size; max_size = SIZE_MAX; @@ -121,7 +121,7 @@ oldsize = *(uint8_t*) size; max_size = UINT8_MAX; } -#if __WORDSIZE == 64 +#if CX_WORDSIZE == 64 else if (width == 32) { oldcap = *(uint32_t*) capacity; oldsize = *(uint32_t*) size; @@ -162,14 +162,14 @@ *array = newmem; // store new capacity - if (width == 0 || width == __WORDSIZE) { + if (width == 0 || width == CX_WORDSIZE) { *(size_t*) capacity = newcap; } else if (width == 16) { *(uint16_t*) capacity = newcap; } else if (width == 8) { *(uint8_t*) capacity = newcap; } -#if __WORDSIZE == 64 +#if CX_WORDSIZE == 64 else if (width == 32) { *(uint32_t*) capacity = newcap; } @@ -201,7 +201,7 @@ size_t oldcap; size_t oldsize; size_t max_size; - if (width == 0 || width == __WORDSIZE) { + if (width == 0 || width == CX_WORDSIZE) { oldcap = *(size_t*) capacity; oldsize = *(size_t*) size; max_size = SIZE_MAX; @@ -214,7 +214,7 @@ oldsize = *(uint8_t*) size; max_size = UINT8_MAX; } -#if __WORDSIZE == 64 +#if CX_WORDSIZE == 64 else if (width == 32) { oldcap = *(uint32_t*) capacity; oldsize = *(uint32_t*) size; @@ -278,7 +278,7 @@ // if any of size or capacity changed, store them back if (newsize != oldsize || newcap != oldcap) { - if (width == 0 || width == __WORDSIZE) { + if (width == 0 || width == CX_WORDSIZE) { *(size_t*) capacity = newcap; *(size_t*) size = newsize; } else if (width == 16) { @@ -288,7 +288,7 @@ *(uint8_t*) capacity = newcap; *(uint8_t*) size = newsize; } -#if __WORDSIZE == 64 +#if CX_WORDSIZE == 64 else if (width == 32) { *(uint32_t*) capacity = newcap; *(uint32_t*) size = newsize;