MINOR: hlua: support for optional arguments to core.register_task()
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 9 Mar 2023 15:48:30 +0000 (16:48 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:17 +0000 (08:58 +0200)
commitb8038996e914ce4070ba502f79ea89d2ebf8465d
tree69e6d790126048a17fe913f7cf554e63ecb42baf
parent94ee6632eeb8241a77b624ba5534855424298d54
MINOR: hlua: support for optional arguments to core.register_task()

core.register_task(function) may now take up to 4 additional arguments
that will be passed as-is to the task function.
This could be convenient to spawn sub-tasks from existing functions
supporting core.register_task() without the need to use global
variables to pass some context to the newly created task function.

The new prototype is:

  core.register_task(function[, arg1[, arg2[, ...[, arg4]]]])

Implementation remains backward-compatible with existing scripts.
doc/lua-api/index.rst
src/hlua.c