1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-13 04:09:54 +00:00

fix: remove dead code

This commit is contained in:
GrayJack 2024-04-16 16:24:39 -03:00
parent b483c9e2e4
commit c5af2a9313

View File

@ -439,16 +439,6 @@ int janet_compare(Janet x, Janet y) {
return status - 2;
}
static int32_t getter_checkint(JanetType type, Janet key, int32_t max) {
if (!janet_checkint(key)) goto bad;
int32_t ret = janet_unwrap_integer(key);
if (ret < 0) goto bad;
if (ret >= max) goto bad;
return ret;
bad:
janet_panicf("expected integer key for %s in range [0, %d), got %v", janet_type_names[type], max, key);
}
static size_t getter_checksize(JanetType type, Janet key, size_t max) {
if (!janet_checksize(key)) goto bad;
size_t ret = janet_unwrap_size(key);