1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-11-21 12:40:04 +00:00

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 "core/lerror.h"

View File

@ -4,7 +4,7 @@
#include "core/lmem.h"
#include "core/lsodium.h"
#include "core/ltask.h"
#include "cpanel.h"
#include "cauth.h"
#include "cpeer.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)
{
struct sLaikaV_vm vm = {
/* boxes have 2 reserved constants, [0] for the output, [1] for the input */
.constList =
{
/* boxes have 3 reserved constants */
.constList = {
[LAIKA_BOX_UNLOCKED_INDX] = LAIKA_MAKE_VM_PTR(box->unlockedData),
[LAIKA_BOX_SCRATCH_INDX] = LAIKA_MAKE_VM_PTR(box->scratch),
[LAIKA_BOX_DATA_INDX] = LAIKA_MAKE_VM_PTR(data),
},
.code = { 0 },
.stack = { 0 },
.code = {0}, /* zero initalized */
.stack = {0}, /* zero initalized */
.pc = 0
};