From: John L. <jr...@us...> - 2010-08-12 23:41:17
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv31654/wxLua/bindings Modified Files: genwxbind.lua Log Message: Add a few wxString methods, To/FromUTF8() Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** genwxbind.lua 21 Dec 2009 04:06:10 -0000 1.186 --- genwxbind.lua 12 Aug 2010 23:41:09 -0000 1.187 *************** *** 273,276 **** --- 273,277 ---- AllocDataType("LuaTable", "special", true) AllocDataType("wxString", "special", true) + AllocDataType("wxCharBuffer", "special", true) --AllocDataType("wxArrayString", "special", true) -- special, but we only convert input, not output --AllocDataType("wxSortedArrayString", "special", true) -- special, but we only convert input, not output *************** *** 2372,2376 **** lineState.Name = tag lineState.DataType = parseState.ObjectStack[1].Name ! -- If we're at the globals level they should have declared this as -- %define_object wxPoint wxDefaultPosition --- 2373,2377 ---- lineState.Name = tag lineState.DataType = parseState.ObjectStack[1].Name ! -- If we're at the globals level they should have declared this as -- %define_object wxPoint wxDefaultPosition *************** *** 2380,2384 **** t = t + 1 end ! lineState.Action = nil lineState.ActionMandatory = false --- 2381,2385 ---- t = t + 1 end ! lineState.Action = nil lineState.ActionMandatory = false *************** *** 3883,3886 **** --- 3884,3893 ---- CommentBindingTable(codeList, " // push the result string\n") table.insert(codeList, " wxlua_pushwxString(L, "..returnPtr.."returns);\n") + elseif (memberType == "char") and (returnPtr == "*") then + CommentBindingTable(codeList, " // push the result string\n") + table.insert(codeList, " lua_pushstring(L, (const char *)returns);\n") + elseif memberType == "wxCharBuffer" then + CommentBindingTable(codeList, " // push the result string\n") + table.insert(codeList, " lua_pushstring(L, returns.data());\n") elseif not numeric then CommentBindingTable(codeList, " // push the result datatype\n") *************** *** 4048,4052 **** local wxlua_delete_function_name = "wxLua_"..MakeVar(parseObject.Name).."_delete_function" ! -- Extern Class Tag Declaration local tagcondition = FixCondition(parseObject.Condition) --- 4055,4059 ---- local wxlua_delete_function_name = "wxLua_"..MakeVar(parseObject.Name).."_delete_function" ! -- Extern Class Tag Declaration local tagcondition = FixCondition(parseObject.Condition) *************** *** 4123,4127 **** table.insert(interface.objectData[o].BindTable, delMethodBinding) end ! local classcondition = FixCondition(parseObject.Condition) --- 4130,4134 ---- table.insert(interface.objectData[o].BindTable, delMethodBinding) end ! local classcondition = FixCondition(parseObject.Condition) *************** *** 4478,4482 **** table.insert(fileData, indent.."static int wxluabaseclass_vtable_offsets_"..classTypeBinding.LuaName.."[] = "..classTypeBinding.BaseClassVtableOffsets.."\n") end ! table.insert(fileData, indent..classTypeBinding.ExternDeleteFunction) end --- 4485,4489 ---- table.insert(fileData, indent.."static int wxluabaseclass_vtable_offsets_"..classTypeBinding.LuaName.."[] = "..classTypeBinding.BaseClassVtableOffsets.."\n") end ! table.insert(fileData, indent..classTypeBinding.ExternDeleteFunction) end *************** *** 4931,4935 **** wxlua_delete_function_code = table.concat(overrideTable[wxlua_delete_function_name]) else ! wxlua_delete_function_code = "void "..wxlua_delete_function_name.."(void** p)\n{\n".. " "..ObjectName.."* o = ("..ObjectName.."*)(*p);\n".. --- 4938,4942 ---- wxlua_delete_function_code = table.concat(overrideTable[wxlua_delete_function_name]) else ! wxlua_delete_function_code = "void "..wxlua_delete_function_name.."(void** p)\n{\n".. " "..ObjectName.."* o = ("..ObjectName.."*)(*p);\n".. |