Commit e1e78e16 authored by Marek Vavruša's avatar Marek Vavruša

daemon/bindings: cleanup

parent d0982bb3
......@@ -42,17 +42,6 @@ static int format_error(lua_State* L, const char *err)
return 1;
}
/** @internal Compatibility wrapper for Lua 5.0 - 5.2 */
#if LUA_VERSION_NUM >= 502
#define register_lib(L, name, lib) \
luaL_newlib((L), (lib))
#else
#define lua_rawlen(L, obj) \
lua_objlen((L), (obj))
#define register_lib(L, name, lib) \
luaL_openlib((L), (name), (lib), 0)
#endif
/** List loaded modules */
static int mod_list(lua_State *L)
{
......
......@@ -25,6 +25,17 @@
#include "daemon/engine.h"
/** @internal Compatibility wrapper for Lua 5.0 - 5.2 */
#if LUA_VERSION_NUM >= 502
#define register_lib(L, name, lib) \
luaL_newlib((L), (lib))
#else
#define lua_rawlen(L, obj) \
lua_objlen((L), (obj))
#define register_lib(L, name, lib) \
luaL_openlib((L), (name), (lib), 0)
#endif
/**
* Load 'modules' package.
* @param L scriptable
......
......@@ -8,6 +8,7 @@ kresd_SOURCES := \
daemon/worker.c \
daemon/bindings.c \
daemon/ffimodule.c \
daemon/bindings/kres.c \
daemon/main.c
# Embed resources
......
......@@ -370,6 +370,7 @@ int kr_make_query(struct kr_query *query, knot_pkt_t *pkt)
/* Query built, expect answer. */
query->id = isaac_next_uint(&ISAAC, UINT16_MAX);
knot_wire_set_id(pkt->wire, query->id);
pkt->parsed = pkt->size;
return kr_ok();
}
......
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