Follow-up Comment #5, bug #16008 (project freeciv): Maybe it's better to make system lua and/or system tolua options when configuring Freeciv?
the use of tolua_getmetatable is because of a dependence on tolua's implementation that I have written in. Specifically, script_remove_exported_object in script.c that we use to "remove" dead units/cities from Lua (otherwise we'd leave dangling pointers in Lua variables and no chance for the scripter to check if a given unit was valid or not). I don't see an obvious way right now to solve this differently, since we have no tolua hooks for when objects enter Lua-space. Of course, the solution works fine with tolua 5.1.2 and 5.1.3. Leaving tolua in-tree leaves the possibility to modify it (which has some obvious disadvantages since then we can't go back to standard tolua), the only suggestion so far was to be able to annotate our Lua API's function arguments with "not nil" or similar, which would cut away a lot of boilerplate argument checks in server/scripting/api_*.c _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?16008> _______________________________________________ Meddelandet skickades via/av Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freecivemail@example.com https://mail.gna.org/listinfo/freeciv-dev