]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: lua: remove hlua_sample_fetch
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Mar 2015 13:27:20 +0000 (14:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2015 19:41:47 +0000 (20:41 +0100)
commit2ec2274f906fdda55f49cbc4f84ab650e64603e7
treeed97e01a767657625a3e7a7448199c1e585b7050
parent47860ed5050030567bf1c659b7a838c139699c46
MEDIUM: lua: remove hlua_sample_fetch

This struct used to carry only a sample fetch function. Thanks to
lua_pushuserdata(), we don't need to have the Lua engine allocate
that struct for us and we can simply push our pointer onto the stack.
This makes the code more readable by removing several occurrences of
"f->f->". Just like the previous patch, it comes with the nice effect
of saving about 1.3% of performance when fetching samples from Lua.
include/types/hlua.h
src/hlua.c