mirror of
https://github.com/janet-lang/janet
synced 2024-12-27 17:00:27 +00:00
Patch util.c
This commit is contained in:
parent
e76b8da269
commit
7f7ee75954
@ -429,10 +429,11 @@ void janet_registry_put(
|
|||||||
if (newcap < 512) {
|
if (newcap < 512) {
|
||||||
newcap = 512;
|
newcap = 512;
|
||||||
}
|
}
|
||||||
janet_vm.registry = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
|
void *newmem = janet_realloc(janet_vm.registry, newcap * sizeof(JanetCFunRegistry));
|
||||||
if (NULL == janet_vm.registry) {
|
if (NULL == newmem) {
|
||||||
JANET_OUT_OF_MEMORY;
|
JANET_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
janet_vm.registry = newmem;
|
||||||
janet_vm.registry_cap = newcap;
|
janet_vm.registry_cap = newcap;
|
||||||
}
|
}
|
||||||
JanetCFunRegistry value = {
|
JanetCFunRegistry value = {
|
||||||
|
Loading…
Reference in New Issue
Block a user