mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MINOR: hlua: hlua_yieldk ctx argument should support pointers
lua_yieldk ctx argument is of type lua_KContext which is typedefed to intptr_t when available so it can be used to store pointers. But the wrapper function hlua_yieldk() passes it as a regular it so it breaks that promise. Changing hlua_yieldk() prototype so that ctx argument is of type lua_KContext. This bug had no functional impact because ctx argument is not being actively used so far. This may be backported to all stable versions anyway.
This commit is contained in:
parent
49ddd87d41
commit
2e7d3d2e5c
@ -60,7 +60,7 @@ int hlua_ref(lua_State *L);
|
|||||||
void hlua_pushref(lua_State *L, int ref);
|
void hlua_pushref(lua_State *L, int ref);
|
||||||
void hlua_unref(lua_State *L, int ref);
|
void hlua_unref(lua_State *L, int ref);
|
||||||
struct hlua *hlua_gethlua(lua_State *L);
|
struct hlua *hlua_gethlua(lua_State *L);
|
||||||
void hlua_yieldk(lua_State *L, int nresults, int ctx, lua_KFunction k, int timeout, unsigned int flags);
|
void hlua_yieldk(lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k, int timeout, unsigned int flags);
|
||||||
|
|
||||||
#else /* USE_LUA */
|
#else /* USE_LUA */
|
||||||
|
|
||||||
|
@ -1407,7 +1407,7 @@ static inline void hlua_sendlog(struct proxy *px, int level, const char *msg)
|
|||||||
* returned with a timeout and permit to set some flags
|
* returned with a timeout and permit to set some flags
|
||||||
* <timeout> is a tick value
|
* <timeout> is a tick value
|
||||||
*/
|
*/
|
||||||
__LJMP void hlua_yieldk(lua_State *L, int nresults, int ctx,
|
__LJMP void hlua_yieldk(lua_State *L, int nresults, lua_KContext ctx,
|
||||||
lua_KFunction k, int timeout, unsigned int flags)
|
lua_KFunction k, int timeout, unsigned int flags)
|
||||||
{
|
{
|
||||||
struct hlua *hlua;
|
struct hlua *hlua;
|
||||||
|
Loading…
Reference in New Issue
Block a user