mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-21 20:40:05 +00:00
minor refactoring
This commit is contained in:
parent
490fcec4e7
commit
7ec814525c
@ -1,4 +1,4 @@
|
|||||||
#include "cpanel.h"
|
#include "cauth.h"
|
||||||
|
|
||||||
#include "cnc.h"
|
#include "cnc.h"
|
||||||
#include "core/lerror.h"
|
#include "core/lerror.h"
|
@ -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"
|
||||||
|
|
||||||
|
@ -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 },
|
.code = {0}, /* zero initalized */
|
||||||
.stack = { 0 },
|
.stack = {0}, /* zero initalized */
|
||||||
.pc = 0
|
.pc = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user