[Commits] [wesnoth/wesnoth] 9812e1: change member function registration to use templat...

GitHub noreply at github.com
Fri Apr 10 19:42:26 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 9812e14acdd9a1727ce05de99bd9d75780ad4fb5
      https://github.com/wesnoth/wesnoth/commit/9812e14acdd9a1727ce05de99bd9d75780ad4fb5
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-04-10 (Fri, 10 Apr 2015)

  Changed paths:
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  change member function registration to use templates and extraspace

This is used instead of the boost::bind and boost::function method
introduced before. It's a bit simpler than the boost::function code
in lua_cpp_function, and a bit faster / less can go wrong when we
don't use boost::fucntion.

It also fixes a potential future use-case -- if a lua state is
copied, but many of the functions in the environment are made with
boost bind, they become bad pointers since they point to the old
lua state, and there is no easy way to retrieve them. Using lua
extra space instead of bind ties the lua_State more tightly to our
C++ representation of it.


  Commit: 97ce93af0338edd4c3e8be9761a6767743ad5091
      https://github.com/wesnoth/wesnoth/commit/97ce93af0338edd4c3e8be9761a6767743ad5091
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-04-10 (Fri, 10 Apr 2015)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  change many callbacks in game_lua_kernel to use lua extraspace


  Commit: 0a4a385e50c8a93577f197bcc67944e5ed65c61a
      https://github.com/wesnoth/wesnoth/commit/0a4a385e50c8a93577f197bcc67944e5ed65c61a
  Author: Chris Beck <render787 at gmail.com>
  Date:   2015-04-10 (Fri, 10 Apr 2015)

  Changed paths:
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  move most of the remaining lua callbacks not to use boost bind


Compare: https://github.com/wesnoth/wesnoth/compare/d57761571e98...0a4a385e50c8


More information about the Commits mailing list