We accidentally enabled nested tables previously, and now it errors properly when the tables contain cycles. Before you'd get (or at least I got) a nice lua stack overflow error.
--HG--
branch : minor
Since the type is passed to va_start, and apparently that's undefined behaviour if it's a reference.
<Textmode> the best kind of behavior
--HG--
branch : dynamiccore2
- Type names for love's Lua objects are specified as an argument to luax_register_type, rather than being statically defined in an array.
- luax_register_type takes a variable number of method array arguments, for registering superclass methods without copying them into the subclass' method array.
Also removed most of the header declarations for wrapper functions.
performAtomic calls the function and passes the Channel as the first argument, plus any additional specified arguments. The called function should do as little work as possible.
To other threads, all methods for that Channel are executed in a single step inside the function. This can prevent a large number of potiential race conditions.
Example:
-- main.lua:
local function set(channel, value)
channel:clear()
channel:push(value)
return "set value"
end
assert(channel:performAtomic(set, 1) == "set value")
-- thread.lua
while true do
assert(channel:peek() == 1)
end