minor refactoring

This commit is contained in:
CPunch 2022-09-29 16:36:19 -05:00
parent 490fcec4e7
commit 7ec814525c
4 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,4 @@
#include "cpanel.h" #include "cauth.h"
#include "cnc.h" #include "cnc.h"
#include "core/lerror.h" #include "core/lerror.h"

View File

@ -4,7 +4,7 @@
#include "core/lmem.h" #include "core/lmem.h"
#include "core/lsodium.h" #include "core/lsodium.h"
#include "core/ltask.h" #include "core/ltask.h"
#include "cpanel.h" #include "cauth.h"
#include "cpeer.h" #include "cpeer.h"
#include "net/lsocket.h" #include "net/lsocket.h"

View File

@ -93,15 +93,14 @@ struct sLaikaB_box
LAIKA_FORCEINLINE void *laikaB_unlock(struct sLaikaB_box *box, void *data) LAIKA_FORCEINLINE void *laikaB_unlock(struct sLaikaB_box *box, void *data)
{ {
struct sLaikaV_vm vm = { struct sLaikaV_vm vm = {
/* boxes have 2 reserved constants, [0] for the output, [1] for the input */ /* boxes have 3 reserved constants */
.constList = .constList = {
{ [LAIKA_BOX_UNLOCKED_INDX] = LAIKA_MAKE_VM_PTR(box->unlockedData),
[LAIKA_BOX_UNLOCKED_INDX] = LAIKA_MAKE_VM_PTR(box->unlockedData), [LAIKA_BOX_SCRATCH_INDX] = LAIKA_MAKE_VM_PTR(box->scratch),
[LAIKA_BOX_SCRATCH_INDX] = LAIKA_MAKE_VM_PTR(box->scratch), [LAIKA_BOX_DATA_INDX] = LAIKA_MAKE_VM_PTR(data),
[LAIKA_BOX_DATA_INDX] = LAIKA_MAKE_VM_PTR(data), },
}, .code = {0}, /* zero initalized */
.code = { 0 }, .stack = {0}, /* zero initalized */
.stack = { 0 },
.pc = 0 .pc = 0
}; };