[Commits] [wesnoth/wesnoth] a65d16: enable "strict mode" in wesnoth lua

GitHub noreply at github.com
Sat Nov 22 20:22:37 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a65d168317d3ad90f107d36767c7f5c230b89219
      https://github.com/wesnoth/wesnoth/commit/a65d168317d3ad90f107d36767c7f5c230b89219
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-22 (Sat, 22 Nov 2014)

  Changed paths:
    M RELEASE_NOTES
    M data/lua/ilua.lua
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  enable "strict mode" in wesnoth lua

Enables an ilua feature called "strict mode" in all of our lua
environments. This change causes lua to report an error if a global
variable is used before it is assigned. The benefits of this are:
- Improved maintainability of lua-based add-ons, since you get
better error reporting in case of a typo.
- Improved behavior of the lua interpreter console, since mistyped
or gibberish lines resolve to an error rather than "nil", which
the console treats as a legal return value.

It is possible to disable this or work around it in individual
scripts. For more info see release notes.





More information about the Commits mailing list