// Copyright (c) 2021 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "../libs.h" /** Implies that the arguments the function will take is variable */ #define SCRIPTER_VARIABLE_ARGUMENT_COUNT DUK_VARARGS /** Global context defintion of the pointer referring back to the scripter */ #define SCRIPTER_SELF_NAME "__scripter" /** Type forwarders */ typedef duk_context scriptercontext_t; typedef duk_ret_t scripterreturn_t; typedef struct { duk_context *context; engine_t *engine; void *user; } scripter_t; typedef scripterreturn_t scriptermethod_t(scriptercontext_t *context);