[Commits] [wesnoth/wesnoth] 8adfd3: fixup lua <-> boost function binding system

GitHub noreply at github.com
Sun Nov 23 23:34:45 UTC 2014


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

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  fixup lua <-> boost function binding system

The solution in place was working but it was flawed in that unlike
with normal lua callbacks, the callbacks would find the userdata
with a pointer to themselves as the first item on the stack. This
breaks the normal lua stack discipline for callback functions.

This commit makes it work normally, removing the stack entry for
the function before it is called, and also making a local copy
of the function pointer in case the lua garbage collector should
deallocate and destroy it when it is removed from the stack.


  Commit: 3740b24b28f150db0589536991c09cd9b7bff299
      https://github.com/wesnoth/wesnoth/commit/3740b24b28f150db0589536991c09cd9b7bff299
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M data/lua/ilua.lua

  Log Message:
  -----------
  fixup ilua _pretty_print function

had some global vs local problems after making this a module loaded
with require rather than a dofile script


  Commit: 7deecdca4693aa94c8d86087ad4bbb9d9d4eb249
      https://github.com/wesnoth/wesnoth/commit/7deecdca4693aa94c8d86087ad4bbb9d9d4eb249
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-23 (Sun, 23 Nov 2014)

  Changed paths:
    M src/server/game.cpp

  Log Message:
  -----------
  Merge branch 'master' of https://github.com/wesnoth/wesnoth


Compare: https://github.com/wesnoth/wesnoth/compare/c0b45c1ecfac...7deecdca4693


More information about the Commits mailing list