mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Added cycle detection to Variant
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
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -63,7 +64,7 @@ public:
|
||||
|
||||
Type getType() const { return type; }
|
||||
|
||||
static Variant fromLua(lua_State *L, int n, bool allowTables = true);
|
||||
static Variant fromLua(lua_State *L, int n, std::set<const void*> *tableSet = nullptr);
|
||||
void toLua(lua_State *L) const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user