Update of /cvsroot/wxlua/wxLua/bindings/wxlua
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1159/wxLua/bindings/wxlua
Modified Files:
wxlua_rules.lua
Log Message:
- Removed the wxLuaBinding::PreRegister() and PostRegister() functions and
made RegisterBinding() virtual
Note: wxLuaBinding::RegisterBinding() now leaves the Lua table that the
binding objects were installed into on the stack. You must pop it.
* The rules.lua for genwxbind.lua now uses wxLuaBinding_class_declaration and
wxLuaBinding_class_implementation to replace wxLuaBinding_preregister and
wxLuaBinding_postregister. You may now add whatever you like to the class
declaration and implementation source code.
Updated to Lua 5.1.3 official
Index: wxlua_rules.lua
===================================================================
RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua_rules.lua,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wxlua_rules.lua 23 Jan 2008 06:43:34 -0000 1.3
--- wxlua_rules.lua 25 Jan 2008 23:50:47 -0000 1.4
***************
*** 33,37 ****
-- bindings in it. This will be used as #include "hook_cpp_header_filename" in
-- the C++ wrapper files, so it must include the proper #include path.
! hook_cpp_header_filename = "wxlua/include/wxlua_bind.h"
-------------------------------------------------------------------------------
--- 33,37 ----
-- bindings in it. This will be used as #include "hook_cpp_header_filename" in
-- the C++ wrapper files, so it must include the proper #include path.
! hook_cpp_header_filename = "wxlua/include/"..hook_cpp_namespace.."_bind.h"
-------------------------------------------------------------------------------
***************
*** 116,136 ****
--=============================================================================
! -- virtual void wxLuaBinding::PreRegister function body for the
! -- hook_cpp_binding_classname. You can initialize data here.
! -- Typically this is not necessary and you can rem this out.
! --wxLuaBinding_PreRegister =
! --=============================================================================
! -- virtual void wxLuaBinding::PostRegister function body for the
! -- hook_cpp_binding_classname. You can load any other custom bindings here.
! -- Typically this is not necessary and you can rem this out.
! wxLuaBinding_PostRegister =
[[
! wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState"));
lua_State* L = wxlState.GetLuaState();
lua_pushlstring(L, "NULL", 4);
wxluaT_pushuserdatatype(L, NULL, wxluatype_NULL, true, true);
! lua_rawset(L, luaTable); // set t["NULL"] = userdata(NULL) w/ NULL tag
]]
--- 116,150 ----
--=============================================================================
! -- Declare functions or member variables for the derived wxLuaBinding class
! -- that will be generated for this binding. The string will be copied verbatim
! -- into the body of the hook_cpp_binding_classname class declaration in the
! -- hook_cpp_header_filename header file. May be remmed out to ignore it.
! -- See usage in the wxWidgets wxbase_rules.lua file.
! wxLuaBinding_class_declaration =
[[
! virtual bool RegisterBinding(const wxLuaState& wxlState);
! ]]
!
! -------------------------------------------------------------------------------
! -- Implement the functions or member variables for the derived wxLuaBinding
! -- class that you have declared. The string will be copied into the
! -- hook_cpp_binding_filename source file. May be remmed out to ignore it.
! -- See usage in the wxWidgets wxbase_rules.lua file.
!
! wxLuaBinding_class_implementation =
! "bool "..hook_cpp_binding_classname.."::RegisterBinding(const wxLuaState& wxlState)\n"..
! [[
! {
! bool ret = wxLuaBinding::RegisterBinding(wxlState);
!
lua_State* L = wxlState.GetLuaState();
lua_pushlstring(L, "NULL", 4);
wxluaT_pushuserdatatype(L, NULL, wxluatype_NULL, true, true);
! lua_rawset(L, -3); // set t["NULL"] = userdata(NULL) w/ NULL tag
!
! return ret;
! }
]]
|