mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
Silence clang warning about comparing function pointers.
The comparison is used to create a set of function pointers.
This commit is contained in:
parent
43a5e12449
commit
bd71e1cd02
@ -409,7 +409,7 @@ static void janet_registry_sort(void) {
|
||||
JanetCFunRegistry reg = janet_vm.registry[i];
|
||||
size_t j;
|
||||
for (j = i; j > 0; j--) {
|
||||
if (janet_vm.registry[j - 1].cfun < reg.cfun) break;
|
||||
if ((void *)(janet_vm.registry[j - 1].cfun) < (void *)(reg.cfun)) break;
|
||||
janet_vm.registry[j] = janet_vm.registry[j - 1];
|
||||
}
|
||||
janet_vm.registry[j] = reg;
|
||||
@ -463,7 +463,7 @@ JanetCFunRegistry *janet_registry_get(JanetCFunction key) {
|
||||
if (mid->cfun == key) {
|
||||
return mid;
|
||||
}
|
||||
if (mid->cfun > key) {
|
||||
if ((void *)(mid->cfun) > (void *)(key)) {
|
||||
hi = mid;
|
||||
} else {
|
||||
lo = mid + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user