Commit 0042b16a authored by Marek Vavruša's avatar Marek Vavruša

daemon/engine: forward decls for Lua

parent 954e0ee6
......@@ -19,6 +19,10 @@
*/
#pragma once
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include "daemon/engine.h"
/**
......
......@@ -19,6 +19,7 @@
#include <libknot/internal/mem.h>
#include "daemon/engine.h"
#include "daemon/bindings.h"
#include "lib/cache.h"
#include "lib/defines.h"
......
......@@ -16,9 +16,11 @@
#pragma once
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
/*
* @internal These are forward decls to allow building modules with engine but without Lua.
*/
struct lua_State;
typedef int (*lua_CFunction) (struct lua_State *L);
#include "lib/resolve.h"
#include "lib/generic/array.h"
......@@ -27,7 +29,7 @@ struct engine {
struct kr_context resolver;
modulelist_t modules;
mm_ctx_t *pool;
lua_State *L;
struct lua_State *L;
};
int engine_init(struct engine *engine, mm_ctx_t *pool);
......@@ -39,4 +41,4 @@ int engine_register(struct engine *engine, const char *module);
int engine_unregister(struct engine *engine, const char *module);
/** Return engine light userdata. */
void engine_lualib(struct engine *engine, const char *name, lua_CFunction lib_cb);
struct engine *engine_luaget(lua_State *L);
\ No newline at end of file
struct engine *engine_luaget(struct lua_State *L);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment