MINOR: lua-thread: Replace "struct hlua_function" allocation by dedicated function
authorThierry Fournier <thierry.fournier@ozon.io>
Sat, 28 Nov 2020 20:06:35 +0000 (21:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Dec 2020 20:53:16 +0000 (21:53 +0100)
commit62a22aa23f761a40c8b473bfdec07d01b7779846
treef0d7f774e791ca3ad87636dc06a9e3f1578a4eba
parentafc63e2cb1ff270d86823ac55fdbb25a46836e04
MINOR: lua-thread: Replace "struct hlua_function" allocation by dedicated function

The goal is to allow execution of one main lua state per thread.

This function will initialize the struct with other things than 0.
With this function helper, the initialization is centralized and
it prevents mistakes. This patch also keeps a reference to each
declared function in a list. It will be useful in next patches to
control consistency of declared references.
include/haproxy/hlua-t.h
src/hlua.c