From: John L. <jr...@us...> - 2008-01-23 06:44:09
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv692/wxLua/bindings Modified Files: genwxbind.lua Log Message: Use positive values for WXLUA_TXXX types not negative. Initialize the wxLua types when the bindings are initialized not when installed into Lua so we can install the bindings in any order or number for multiple wxLuaStates. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.159 retrieving revision 1.160 diff -C2 -d -r1.159 -r1.160 *** genwxbind.lua 17 Jan 2008 22:37:29 -0000 1.159 --- genwxbind.lua 23 Jan 2008 06:43:34 -0000 1.160 *************** *** 18,22 **** -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 21 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. --- 18,22 ---- -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 22 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. *************** *** 2762,2767 **** else CommentBindingTable(codeList, " // get this\n") ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxluaT_getuserdatatype(L, 1, g_wxluatype_"..MakeClassVar(parseObject.Name)..");\n") ! overload_argList = "&g_wxluatype_"..MakeClassVar(parseObject.Name)..", "..overload_argList end --- 2762,2767 ---- else CommentBindingTable(codeList, " // get this\n") ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxluaT_getuserdatatype(L, 1, wxluatype_"..MakeClassVar(parseObject.Name)..");\n") ! overload_argList = "&wxluatype_"..MakeClassVar(parseObject.Name)..", "..overload_argList end *************** *** 2773,2783 **** -- if string.find(member.Name, "::") then ! -- table.insert(codeList, " wxluaT_pushuserdatatype(L, "..member.Name..", g_wxluatype_"..MakeClassVar(memberType)..");\n") -- else ! table.insert(codeList, " wxluaT_pushuserdatatype(L, &"..self_name..member.Name..", g_wxluatype_"..MakeClassVar(memberType)..");\n") -- end elseif not numeric then CommentBindingTable(codeList, " // push the result datatype\n") ! table.insert(codeList, " wxluaT_pushuserdatatype(L, "..self_name..member.Name..", g_wxluatype_"..MakeClassVar(memberType)..");\n") elseif (memberType == "BOOL") or (memberType == "bool") then --- 2773,2783 ---- -- if string.find(member.Name, "::") then ! -- table.insert(codeList, " wxluaT_pushuserdatatype(L, "..member.Name..", wxluatype_"..MakeClassVar(memberType)..");\n") -- else ! table.insert(codeList, " wxluaT_pushuserdatatype(L, &"..self_name..member.Name..", wxluatype_"..MakeClassVar(memberType)..");\n") -- end elseif not numeric then CommentBindingTable(codeList, " // push the result datatype\n") ! table.insert(codeList, " wxluaT_pushuserdatatype(L, "..self_name..member.Name..", wxluatype_"..MakeClassVar(memberType)..");\n") elseif (memberType == "BOOL") or (memberType == "bool") then *************** *** 2855,2879 **** if memberType == "wxString" then ! overload_argList = overload_argList.."&g_wxluatype_TSTRING, " CommentBindingTable(codeList, " // get the string value\n") table.insert(codeList, " wxString val = wxlua_getwxStringtype(L, "..stack_idx..");\n") elseif not numeric and (not memberPtr or (memberPtr == "&")) then ! overload_argList = overload_argList.."&g_wxluatype_"..MakeClassVar(memberType)..", " CommentBindingTable(codeList, " // get the data type value\n") ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxluaT_getuserdatatype(L, "..stack_idx..", g_wxluatype_"..MakeClassVar(memberType)..");\n") elseif not numeric then ! overload_argList = overload_argList.."&g_wxluatype_"..MakeClassVar(memberType)..", " CommentBindingTable(codeList, " // get the data type value\n") ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxluaT_getuserdatatype(L, "..stack_idx..", g_wxluatype_"..MakeClassVar(memberType)..");\n") elseif (memberType == "BOOL") or (memberType == "bool") then ! overload_argList = overload_argList.."&g_wxluatype_TBOOLEAN, " CommentBindingTable(codeList, " // get the boolean value\n") table.insert(codeList, " bool val = wxlua_getbooleantype(L, "..stack_idx..");\n") elseif IsDataTypeEnum(memberType) then ! overload_argList = overload_argList.."&g_wxluatype_TINTEGER, " CommentBindingTable(codeList, " // get the number value\n") table.insert(codeList, " "..memberType.." val = ("..memberType..")wxlua_getintegertype(L, "..stack_idx..");\n") else ! overload_argList = overload_argList.."&g_wxluatype_TNUMBER, " CommentBindingTable(codeList, " // get the number value\n") table.insert(codeList, " "..memberType.." val = ("..memberType..")wxlua_getnumbertype(L, "..stack_idx..");\n") --- 2855,2879 ---- if memberType == "wxString" then ! overload_argList = overload_argList.."&wxluatype_TSTRING, " CommentBindingTable(codeList, " // get the string value\n") table.insert(codeList, " wxString val = wxlua_getwxStringtype(L, "..stack_idx..");\n") elseif not numeric and (not memberPtr or (memberPtr == "&")) then ! overload_argList = overload_argList.."&wxluatype_"..MakeClassVar(memberType)..", " CommentBindingTable(codeList, " // get the data type value\n") ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxluaT_getuserdatatype(L, "..stack_idx..", wxluatype_"..MakeClassVar(memberType)..");\n") elseif not numeric then ! overload_argList = overload_argList.."&wxluatype_"..MakeClassVar(memberType)..", " CommentBindingTable(codeList, " // get the data type value\n") ! table.insert(codeList, " "..memberType.."* val = ("..memberType.."*)wxluaT_getuserdatatype(L, "..stack_idx..", wxluatype_"..MakeClassVar(memberType)..");\n") elseif (memberType == "BOOL") or (memberType == "bool") then ! overload_argList = overload_argList.."&wxluatype_TBOOLEAN, " CommentBindingTable(codeList, " // get the boolean value\n") table.insert(codeList, " bool val = wxlua_getbooleantype(L, "..stack_idx..");\n") elseif IsDataTypeEnum(memberType) then ! overload_argList = overload_argList.."&wxluatype_TINTEGER, " CommentBindingTable(codeList, " // get the number value\n") table.insert(codeList, " "..memberType.." val = ("..memberType..")wxlua_getintegertype(L, "..stack_idx..");\n") else ! overload_argList = overload_argList.."&wxluatype_TNUMBER, " CommentBindingTable(codeList, " // get the number value\n") table.insert(codeList, " "..memberType.." val = ("..memberType..")wxlua_getnumbertype(L, "..stack_idx..");\n") *************** *** 2888,2893 **** else CommentBindingTable(codeList, " // get this\n") ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxluaT_getuserdatatype(L, 1, g_wxluatype_"..MakeClassVar(parseObject.Name)..");\n") ! overload_argList = "&g_wxluatype_"..MakeClassVar(parseObject.Name)..", "..overload_argList if not numeric and (not memberPtr or (memberPtr == "&")) then --- 2888,2893 ---- else CommentBindingTable(codeList, " // get this\n") ! table.insert(codeList, " "..parseObject.Name.." *self = ("..parseObject.Name.." *)wxluaT_getuserdatatype(L, 1, wxluatype_"..MakeClassVar(parseObject.Name)..");\n") ! overload_argList = "&wxluatype_"..MakeClassVar(parseObject.Name)..", "..overload_argList if not numeric and (not memberPtr or (memberPtr == "&")) then *************** *** 3045,3049 **** { LuaName = luaname, ! Map = " { \""..luaname.."\", &g_wxluatype_"..MakeClassVar(parseObject.Name)..", &"..member.Name..", NULL },\n", Condition = fullcondition } --- 3045,3049 ---- { LuaName = luaname, ! Map = " { \""..luaname.."\", &wxluatype_"..MakeClassVar(parseObject.Name)..", &"..member.Name..", NULL },\n", Condition = fullcondition } *************** *** 3060,3064 **** { LuaName = luaname, ! Map = " { \""..luaname.."\", &g_wxluatype_"..MakeClassVar(parseObject.Name)..", NULL, (const void **) &"..member.Name.." },\n", Condition = fullcondition } --- 3060,3064 ---- { LuaName = luaname, ! Map = " { \""..luaname.."\", &wxluatype_"..MakeClassVar(parseObject.Name)..", NULL, (const void **) &"..member.Name.." },\n", Condition = fullcondition } *************** *** 3075,3079 **** { LuaName = luaname, ! Map = " { \""..luaname.."\", &"..member.Name..", &g_wxluatype_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } --- 3075,3079 ---- { LuaName = luaname, ! Map = " { \""..luaname.."\", &"..member.Name..", &wxluatype_"..MakeClassVar(parseObject.Name).." },\n", Condition = fullcondition } *************** *** 3168,3172 **** ((indirectionCount == 0) or ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then ! overload_argList = overload_argList.."&g_wxluatype_wxArrayString, " argItem = "wxlua_getwxArrayString(L, "..argNum..")" declare = "wxLuaSmartwxArrayString" --- 3168,3172 ---- ((indirectionCount == 0) or ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then ! overload_argList = overload_argList.."&wxluatype_wxArrayString, " argItem = "wxlua_getwxArrayString(L, "..argNum..")" declare = "wxLuaSmartwxArrayString" *************** *** 3174,3178 **** ((indirectionCount == 0) or ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then ! overload_argList = overload_argList.."&g_wxluatype_wxSortedArrayString, " argItem = "wxlua_getwxSortedArrayString(L, "..argNum..")" declare = "wxLuaSmartwxSortedArrayString" --- 3174,3178 ---- ((indirectionCount == 0) or ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then ! overload_argList = overload_argList.."&wxluatype_wxSortedArrayString, " argItem = "wxlua_getwxSortedArrayString(L, "..argNum..")" declare = "wxLuaSmartwxSortedArrayString" *************** *** 3180,3188 **** ((indirectionCount == 0) or ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then ! overload_argList = overload_argList.."&g_wxluatype_wxArrayInt, " argItem = "wxlua_getwxArrayInt(L, "..argNum..")" declare = "wxLuaSmartwxArrayInt" elseif argType == "IntArray_FromLuaTable" then ! overload_argList = overload_argList.."&g_wxluatype_TTABLE, " argItem = "NULL; ptr = "..argName.." = wxlua_getintarray(L, "..argNum..", count_)" declare = "int count_ = 0; wxLuaSmartIntArray ptr; int*" --- 3180,3188 ---- ((indirectionCount == 0) or ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then ! overload_argList = overload_argList.."&wxluatype_wxArrayInt, " argItem = "wxlua_getwxArrayInt(L, "..argNum..")" declare = "wxLuaSmartwxArrayInt" elseif argType == "IntArray_FromLuaTable" then ! overload_argList = overload_argList.."&wxluatype_TTABLE, " argItem = "NULL; ptr = "..argName.." = wxlua_getintarray(L, "..argNum..", count_)" declare = "int count_ = 0; wxLuaSmartIntArray ptr; int*" *************** *** 3191,3195 **** -- THIS MUST BE AN OVERRIDE AND HANDLED THERE, we just set overload_argList -- the code genererated here is nonsense ! overload_argList = overload_argList.."&g_wxluatype_TTABLE, " argItem = "YOU MUST OVERRIDE THIS FUNCTION " declare = "YOU MUST OVERRIDE THIS FUNCTION " --- 3191,3195 ---- -- THIS MUST BE AN OVERRIDE AND HANDLED THERE, we just set overload_argList -- the code genererated here is nonsense ! overload_argList = overload_argList.."&wxluatype_TTABLE, " argItem = "YOU MUST OVERRIDE THIS FUNCTION " declare = "YOU MUST OVERRIDE THIS FUNCTION " *************** *** 3197,3201 **** -- THIS MUST BE AN OVERRIDE AND HANDLED THERE, we just set overload_argList -- the code genererated here is nonsense ! overload_argList = overload_argList.."&g_wxluatype_TFUNCTION, " argItem = "YOU MUST OVERRIDE THIS FUNCTION " declare = "YOU MUST OVERRIDE THIS FUNCTION " --- 3197,3201 ---- -- THIS MUST BE AN OVERRIDE AND HANDLED THERE, we just set overload_argList -- the code genererated here is nonsense ! overload_argList = overload_argList.."&wxluatype_TFUNCTION, " argItem = "YOU MUST OVERRIDE THIS FUNCTION " declare = "YOU MUST OVERRIDE THIS FUNCTION " *************** *** 3210,3214 **** end ! overload_argList = overload_argList.."&g_wxluatype_TTABLE, " argItem = "wxlua_getwxStringarray("..argNum..", count)" declare = "int count = 0; wxLuaSmartStringArray " --- 3210,3214 ---- end ! overload_argList = overload_argList.."&wxluatype_TTABLE, " argItem = "wxlua_getwxStringarray("..argNum..", count)" declare = "int count = 0; wxLuaSmartStringArray " *************** *** 3219,3227 **** end ! overload_argList = overload_argList.."&g_wxluatype_TTABLE, " argItem = "wxlua_getintarray(L, "..argNum..", count)" declare = "int count = 0; wxLuaSmartIntArray " elseif not numeric then ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", g_wxluatype_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" --- 3219,3227 ---- end ! overload_argList = overload_argList.."&wxluatype_TTABLE, " argItem = "wxlua_getintarray(L, "..argNum..", count)" declare = "int count = 0; wxLuaSmartIntArray " elseif not numeric then ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", wxluatype_"..MakeClassVar(argType)..")" else argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" *************** *** 3229,3233 **** elseif (indirectionCount == 1) and (argPtr == "*") then if (argType == "wxString") or (argType == "wxChar") then ! overload_argList = overload_argList.."&g_wxluatype_TSTRING, " argItem = "wxlua_getwxStringtype(L, "..argNum..")" --- 3229,3233 ---- elseif (indirectionCount == 1) and (argPtr == "*") then if (argType == "wxString") or (argType == "wxChar") then ! overload_argList = overload_argList.."&wxluatype_TSTRING, " argItem = "wxlua_getwxStringtype(L, "..argNum..")" *************** *** 3249,3253 **** elseif argType == "char" then ! overload_argList = overload_argList.."&g_wxluatype_TSTRING, " argItem = "wxlua_getstringtype(L, "..argNum..")" --- 3249,3253 ---- elseif argType == "char" then ! overload_argList = overload_argList.."&wxluatype_TSTRING, " argItem = "wxlua_getstringtype(L, "..argNum..")" *************** *** 3262,3269 **** if not numeric then ! overload_argList = overload_argList.."&g_wxluatype_"..MakeClassVar(argType)..", " ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", g_wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&g_wxluatype_TLIGHTUSERDATA, " argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" end --- 3262,3269 ---- if not numeric then ! overload_argList = overload_argList.."&wxluatype_"..MakeClassVar(argType)..", " ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&wxluatype_TLIGHTUSERDATA, " argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" end *************** *** 3282,3290 **** elseif (indirectionCount == 2) and (argPtr == "*") then if not numeric then ! overload_argList = overload_argList.."&g_wxluatype_"..MakeClassVar(argType)..", " argTypeWithAttrib = argTypeWithAttrib.." **" ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", g_wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&g_wxluatype_TLIGHTUSERDATA, " argTypeWithAttrib = argTypeWithAttrib.." *" argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" --- 3282,3290 ---- elseif (indirectionCount == 2) and (argPtr == "*") then if not numeric then ! overload_argList = overload_argList.."&wxluatype_"..MakeClassVar(argType)..", " argTypeWithAttrib = argTypeWithAttrib.." **" ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&wxluatype_TLIGHTUSERDATA, " argTypeWithAttrib = argTypeWithAttrib.." *" argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" *************** *** 3292,3296 **** elseif (indirectionCount == 1) and (argPtr == "&") then if argType == "wxString" then ! overload_argList = overload_argList.."&g_wxluatype_TSTRING, " argItem = "wxlua_getwxStringtype(L, "..argNum..")" --- 3292,3296 ---- elseif (indirectionCount == 1) and (argPtr == "&") then if argType == "wxString" then ! overload_argList = overload_argList.."&wxluatype_TSTRING, " argItem = "wxlua_getwxStringtype(L, "..argNum..")" *************** *** 3308,3315 **** argTypeWithAttrib = argTypeWithAttrib.." *" if not numeric then ! overload_argList = overload_argList.."&g_wxluatype_"..MakeClassVar(argType)..", " ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", g_wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&g_wxluatype_TLIGHTUSERDATA, " argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" end --- 3308,3315 ---- argTypeWithAttrib = argTypeWithAttrib.." *" if not numeric then ! overload_argList = overload_argList.."&wxluatype_"..MakeClassVar(argType)..", " ! argItem = "("..argTypeWithAttrib..")wxluaT_getuserdatatype(L, "..argNum..", wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&wxluatype_TLIGHTUSERDATA, " argItem = "("..argTypeWithAttrib..")wxlua_touserdata(L, "..argNum..")" end *************** *** 3322,3326 **** elseif indirectionCount == 0 then if argType == "wxString" then ! overload_argList = overload_argList.."&g_wxluatype_TSTRING, " argItem = "wxlua_getwxStringtype(L, "..argNum..")" --- 3322,3326 ---- elseif indirectionCount == 0 then if argType == "wxString" then ! overload_argList = overload_argList.."&wxluatype_TSTRING, " argItem = "wxlua_getwxStringtype(L, "..argNum..")" *************** *** 3336,3349 **** end elseif (argType == "bool") or (argType == "BOOL") then ! overload_argList = overload_argList.."&g_wxluatype_TBOOLEAN, " argItem = "wxlua_getbooleantype(L, "..argNum..")" elseif IsDataTypeEnum(argType) then ! overload_argList = overload_argList.."&g_wxluatype_TINTEGER, " argItem = "("..argType..")wxlua_getintegertype(L, "..argNum..")" elseif not numeric then ! overload_argList = overload_argList.."&g_wxluatype_"..MakeClassVar(argType)..", " ! argItem = "*("..argTypeWithAttrib.."*)wxluaT_getuserdatatype(L, "..argNum..", g_wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&g_wxluatype_TNUMBER, " argItem = "("..argType..")wxlua_getnumbertype(L, "..argNum..")" end --- 3336,3349 ---- end elseif (argType == "bool") or (argType == "BOOL") then ! overload_argList = overload_argList.."&wxluatype_TBOOLEAN, " argItem = "wxlua_getbooleantype(L, "..argNum..")" elseif IsDataTypeEnum(argType) then ! overload_argList = overload_argList.."&wxluatype_TINTEGER, " argItem = "("..argType..")wxlua_getintegertype(L, "..argNum..")" elseif not numeric then ! overload_argList = overload_argList.."&wxluatype_"..MakeClassVar(argType)..", " ! argItem = "*("..argTypeWithAttrib.."*)wxluaT_getuserdatatype(L, "..argNum..", wxluatype_"..MakeClassVar(argType)..")" else ! overload_argList = overload_argList.."&wxluatype_TNUMBER, " argItem = "("..argType..")wxlua_getnumbertype(L, "..argNum..")" end *************** *** 3594,3598 **** CommentBindingTable(codeList, " // push the constructed class pointer\n") ! table.insert(codeList, " wxluaT_pushuserdatatype(L, returns, g_wxluatype_"..MakeClassVar(parseObject.Name)..");\n") table.insert(codeList, "\n return 1;\n") --- 3594,3598 ---- CommentBindingTable(codeList, " // push the constructed class pointer\n") ! table.insert(codeList, " wxluaT_pushuserdatatype(L, returns, wxluatype_"..MakeClassVar(parseObject.Name)..");\n") table.insert(codeList, "\n return 1;\n") *************** *** 3607,3612 **** CommentBindingTable(codeList, " // get this\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxluaT_getuserdatatype(L, 1, g_wxluatype_"..MakeClassVar(parseObject.Name)..");\n") ! overload_argList = "&g_wxluatype_"..MakeClassVar(parseObject.Name)..", "..overload_argList if parseObject["%ungc_this"] then --- 3607,3612 ---- CommentBindingTable(codeList, " // get this\n") ! table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxluaT_getuserdatatype(L, 1, wxluatype_"..MakeClassVar(parseObject.Name)..");\n") ! overload_argList = "&wxluatype_"..MakeClassVar(parseObject.Name)..", "..overload_argList if parseObject["%ungc_this"] then *************** *** 3704,3708 **** elseif not numeric then CommentBindingTable(codeList, " // push the result datatype\n") ! table.insert(codeList, " wxluaT_pushuserdatatype(L, returns, g_wxluatype_"..MakeClassVar(memberType)..");\n") elseif (member.DataType == "BOOL") or (member.DataType == "bool") then CommentBindingTable(codeList, " // push the result flag\n") --- 3704,3708 ---- elseif not numeric then CommentBindingTable(codeList, " // push the result datatype\n") ! table.insert(codeList, " wxluaT_pushuserdatatype(L, returns, wxluatype_"..MakeClassVar(memberType)..");\n") elseif (member.DataType == "BOOL") or (member.DataType == "bool") then CommentBindingTable(codeList, " // push the result flag\n") *************** *** 3810,3814 **** local classTypeBinding = { ! ExternDeclaration = "extern "..MakeImpExpData("int").." g_wxluatype_"..MakeClassVar(parseObject.Name)..";\n", ExternMethodDeclaration = "extern "..output_cpp_impexpsymbol.." wxLuaBindMethod "..MakeVar(parseObject.Name).."_methods[];\n", ExternMethodCountDeclaration = "extern "..MakeImpExpData("int").." "..MakeVar(parseObject.Name).."_methodCount;\n", --- 3810,3814 ---- local classTypeBinding = { ! ExternDeclaration = "extern "..MakeImpExpData("int").." wxluatype_"..MakeClassVar(parseObject.Name)..";\n", ExternMethodDeclaration = "extern "..output_cpp_impexpsymbol.." wxLuaBindMethod "..MakeVar(parseObject.Name).."_methods[];\n", ExternMethodCountDeclaration = "extern "..MakeImpExpData("int").." "..MakeVar(parseObject.Name).."_methodCount;\n", *************** *** 3826,3830 **** decl = decl.."// Lua MetaTable Tag for Class '"..parseObject.Name.."'\n" end ! decl = decl.."int g_wxluatype_"..MakeClassVar(parseObject.Name).." = -1;\n" interface.objectData[o].TagDeclaration = decl --- 3826,3830 ---- decl = decl.."// Lua MetaTable Tag for Class '"..parseObject.Name.."'\n" end ! decl = decl.."int wxluatype_"..MakeClassVar(parseObject.Name).." = WXLUA_TUNKNOWN;\n" interface.objectData[o].TagDeclaration = decl *************** *** 3855,3859 **** local overload_argListName = "s_wxluatypeArray_".. funcName ! local overload_argList = "{ &g_wxluatype_"..MakeClassVar(parseObject.Name)..", NULL }" local condition = FixCondition(parseObject.Condition) --- 3855,3859 ---- local overload_argListName = "s_wxluatypeArray_".. funcName ! local overload_argList = "{ &wxluatype_"..MakeClassVar(parseObject.Name)..", NULL }" local condition = FixCondition(parseObject.Condition) *************** *** 3894,3898 **** ..MakeVar(parseObject.Name).."_methodCount, " ..classinfo..", " ! .."&g_wxluatype_"..MakeClassVar(parseObject.Name)..", " ..MakeVar(baseclass)..", " .."NULL ," --- 3894,3898 ---- ..MakeVar(parseObject.Name).."_methodCount, " ..classinfo..", " ! .."&wxluatype_"..MakeClassVar(parseObject.Name)..", " ..MakeVar(baseclass)..", " .."NULL ," *************** *** 4028,4032 **** table.insert(fileData, "// binding class\n") ! table.insert(fileData, "class "..hook_cpp_binding_classname.." : public wxLuaBinding\n") table.insert(fileData, "{\n") table.insert(fileData, "public:\n") --- 4028,4032 ---- table.insert(fileData, "// binding class\n") ! table.insert(fileData, "class "..output_cpp_impexpsymbol.." "..hook_cpp_binding_classname.." : public wxLuaBinding\n") table.insert(fileData, "{\n") table.insert(fileData, "public:\n") *************** *** 4080,4083 **** --- 4080,4084 ---- end + --[[ table.insert(fileData, "\n") *************** *** 4092,4096 **** table.insert(fileData, "extern wxLuaBindObject *"..hook_cpp_object_funcname.."(size_t &count);\n") table.insert(fileData, "extern wxLuaBindMethod *"..hook_cpp_function_funcname.."(size_t &count);\n\n") ! -- ------------------------------------------------------------------------ -- Class Tag Declaration - sorted by condition for the C++ compiler --- 4093,4097 ---- table.insert(fileData, "extern wxLuaBindObject *"..hook_cpp_object_funcname.."(size_t &count);\n") table.insert(fileData, "extern wxLuaBindMethod *"..hook_cpp_function_funcname.."(size_t &count);\n\n") ! ]] -- ------------------------------------------------------------------------ -- Class Tag Declaration - sorted by condition for the C++ compiler |