diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-03 13:37:05 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-03 13:37:05 -0500 |
| commit | bf5a7253458ec5b3f4fe054b3b2f5f80211c1892 (patch) | |
| tree | e2ec63d23498c661bfda29dafa3e0311ed1140d1 /builtins/array.h | |
| parent | ec7a9e5f107a68072b3a4dd84aa6a4b461657345 (diff) | |
Definitively go with "Int" and "Num" over "Int64" and "Num64", plus add
Int__bits()
Diffstat (limited to 'builtins/array.h')
| -rw-r--r-- | builtins/array.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtins/array.h b/builtins/array.h index 76ab29fd..021166b9 100644 --- a/builtins/array.h +++ b/builtins/array.h @@ -12,7 +12,7 @@ const array_t $arr = x; int64_t $index = (int64_t)(i); \ int64_t $off = $index + ($index < 0) * ($arr.length + 1) - 1; \ if (__builtin_expect($off < 0 || $off >= $arr.length, 0)) \ - fail_source(filename, start, end, "Invalid array index: %r (array has length %ld)\n", Int64__as_str(&$index, USE_COLOR, NULL), $arr.length); \ + fail_source(filename, start, end, "Invalid array index: %r (array has length %ld)\n", Int__as_str(&$index, USE_COLOR, NULL), $arr.length); \ (type*)($arr.data + $arr.stride * $off);}) #define $Array_get_unchecked(type, x, i) *({ const array_t $arr = x; int64_t $index = (int64_t)(i); \ int64_t $off = $index + ($index < 0) * ($arr.length + 1) - 1; \ |
