Skip to content
Snippets Groups Projects
Verified Commit d3b2474a authored by Petr Špaček's avatar Petr Špaček Committed by Vladimír Čunát
Browse files

fixup! daemon/lua: added basic bindings for LRU

Fix mess in daemon/lua/kres-gen.lua after
6e2ed9ec
parent 9183c3a6
Branches
Tags
1 merge request!608Protection from DNS rebinding attack
......@@ -5,6 +5,7 @@ typedef struct knot_dump_style knot_dump_style_t;
extern const knot_dump_style_t KNOT_DUMP_STYLE_DEFAULT;
typedef void knot_db_t;
struct kr_cdb_api {};
struct lru {};
typedef struct knot_mm {
void *ctx, *alloc, *free;
......@@ -310,7 +311,7 @@ void kr_zonecut_set(struct kr_zonecut *, const knot_dname_t *);
uint64_t kr_now();
void lru_free_items_impl(struct lru *);
struct lru *lru_create_impl(unsigned int, knot_mm_t *, knot_mm_t *);
void *lru_get_impl(struct lru *, const char *, unsigned int, unsigned int, bool, bool *);
void *lru_get_impl(struct lru *, const char *, unsigned int, unsigned int, _Bool, _Bool *);
knot_rrset_t *kr_ta_get(map_t *, const knot_dname_t *);
int kr_ta_add(map_t *, const knot_dname_t *, uint16_t, uint32_t, const uint8_t *, uint16_t);
int kr_ta_del(map_t *, const knot_dname_t *);
......
......@@ -53,6 +53,8 @@ grep -v '^#\|^$' | while read -r ident; do
;;
esac
fi
# LuaJIT FFI blows up on "uint" type
output="$(echo "$output" | sed 's/\buint\b/unsigned int/g')"
# abort on empty output
if [ -z "$(echo "$output" | tr -d "\n;")" ]; then
......
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