Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pairs_sort in genwxbind.lua for reproducible generates #13

Merged
merged 2 commits into from
Apr 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions wxLua/bindings/genwxbind.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3212,7 +3212,7 @@ function GenerateLuaLanguageBinding(interface)

-- build member condition
local membercondition = nil
for idx, condition in pairs(dependConditions) do
for idx, condition in pairs_sort(dependConditions) do
membercondition = AddCondition(membercondition, condition)
end
membercondition = FixCondition(membercondition)
Expand Down Expand Up @@ -4302,7 +4302,7 @@ function GenerateLuaLanguageBinding(interface)

-- build method condition
local methodcondition = nil
for idx, condition in pairs(dependConditions) do
for idx, condition in pairs_sort(dependConditions) do
methodcondition = AddCondition(methodcondition, condition)
end

Expand Down Expand Up @@ -4351,10 +4351,10 @@ function GenerateLuaLanguageBinding(interface)

if (parseObject.ObjType == "objtype_class") or (parseObject.ObjType == "objtype_struct") then
-- Class Includes
for condition, includeBindingList in pairs(interface.includeBindingTable) do
for condition, includeBindingList in pairs_sort(interface.includeBindingTable) do
if not classIncludeBindingTable[condition] then classIncludeBindingTable[condition] = {} end

for idx, includeBinding in pairs(includeBindingList) do
for idx, includeBinding in pairs_sort(includeBindingList) do
classIncludeBindingTable[condition][idx] = includeBinding
end
end
Expand Down Expand Up @@ -4817,7 +4817,7 @@ function GenerateHookClassFileTable(fileData)

classNames = TableSort(classNames)

for _, c in pairs(classNames) do
for _, c in pairs_sort(classNames) do
table.insert(fileData, "static const char* wxluaclassname_"..c.." = \""..c.."\";\n")
end

Expand Down Expand Up @@ -5381,15 +5381,15 @@ function RemoveExtra_wxLuaBindCFunc(fileData)

cfuncTable[s] = n
elseif string.find(fileData[n], "s_wxluafunc", 1, 1) then
for k, v in pairs(cfuncTable) do
for k, v in pairs_sort(cfuncTable) do
if string.find(fileData[n], k..",", 1, 1) or string.find(fileData[n], k.." ", 1, 1) then
cfuncTable[k] = -1 -- found
end
end
end
end

for k, v in pairs(cfuncTable) do
for k, v in pairs_sort(cfuncTable) do
if v > 0 then
fileData[v] = "// "..fileData[v]
end
Expand Down Expand Up @@ -5528,7 +5528,7 @@ function main()

-- load any cached settings from other wrappers
if datatype_cache_input_fileTable then
for key, filename in pairs(datatype_cache_input_fileTable) do
for key, filename in pairs_sort(datatype_cache_input_fileTable) do
if FileExists(filename) then
local cache = loadfile(filename)
cache() -- run loaded file
Expand Down
96 changes: 48 additions & 48 deletions wxLua/modules/wxbind/src/wxadv_bind.cpp

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions wxLua/modules/wxbind/src/wxaui_bind.cpp

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions wxLua/modules/wxbind/src/wxbase_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7426,7 +7426,7 @@ static wxLuaArgType s_wxluatypeArray_wxLua_wxFSFile_delete[] = { &wxluatype_wxFS
static wxLuaBindCFunc s_wxluafunc_wxLua_wxFSFile_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxFSFile_delete }};


#if ((wxLUA_USE_wxDateTime && wxUSE_DATETIME) && (wxUSE_STREAMS)) && ((wxUSE_FILESYSTEM) && (wxUSE_STREAMS))
#if (((wxUSE_FILESYSTEM) && (wxUSE_STREAMS)) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxUSE_STREAMS)
static wxLuaArgType s_wxluatypeArray_wxLua_wxFSFile_constructor[] = { &wxluatype_wxInputStream, &wxluatype_TSTRING, &wxluatype_TSTRING, &wxluatype_TSTRING, &wxluatype_wxDateTime, NULL };
static int LUACALL wxLua_wxFSFile_constructor(lua_State *L);
static wxLuaBindCFunc s_wxluafunc_wxLua_wxFSFile_constructor[1] = {{ wxLua_wxFSFile_constructor, WXLUAMETHOD_CONSTRUCTOR, 5, 5, s_wxluatypeArray_wxLua_wxFSFile_constructor }};
Expand Down Expand Up @@ -7454,7 +7454,7 @@ static int LUACALL wxLua_wxFSFile_constructor(lua_State *L)
return 1;
}

#endif // ((wxLUA_USE_wxDateTime && wxUSE_DATETIME) && (wxUSE_STREAMS)) && ((wxUSE_FILESYSTEM) && (wxUSE_STREAMS))
#endif // (((wxUSE_FILESYSTEM) && (wxUSE_STREAMS)) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxUSE_STREAMS)



Expand Down Expand Up @@ -7485,9 +7485,9 @@ wxLuaBindMethod wxFSFile_methods[] = {

{ "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxFSFile_delete, 1, NULL },

#if ((wxLUA_USE_wxDateTime && wxUSE_DATETIME) && (wxUSE_STREAMS)) && ((wxUSE_FILESYSTEM) && (wxUSE_STREAMS))
#if (((wxUSE_FILESYSTEM) && (wxUSE_STREAMS)) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxUSE_STREAMS)
{ "wxFSFile", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxFSFile_constructor, 1, NULL },
#endif // ((wxLUA_USE_wxDateTime && wxUSE_DATETIME) && (wxUSE_STREAMS)) && ((wxUSE_FILESYSTEM) && (wxUSE_STREAMS))
#endif // (((wxUSE_FILESYSTEM) && (wxUSE_STREAMS)) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxUSE_STREAMS)

{ 0, 0, 0, 0 },
};
Expand Down
16 changes: 8 additions & 8 deletions wxLua/modules/wxbind/src/wxcore_appframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,7 @@ static int LUACALL wxLua_wxTopLevelWindow_ShowWithoutActivating(lua_State *L)

#endif // (wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)

#if (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
#if (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)
static wxLuaArgType s_wxluatypeArray_wxLua_wxTopLevelWindow_constructor1[] = { &wxluatype_wxWindow, &wxluatype_TNUMBER, &wxluatype_TSTRING, &wxluatype_wxPoint, &wxluatype_wxSize, &wxluatype_TNUMBER, &wxluatype_TSTRING, NULL };
static int LUACALL wxLua_wxTopLevelWindow_constructor1(lua_State *L);
// static wxLuaBindCFunc s_wxluafunc_wxLua_wxTopLevelWindow_constructor1[1] = {{ wxLua_wxTopLevelWindow_constructor1, WXLUAMETHOD_CONSTRUCTOR, 3, 7, s_wxluatypeArray_wxLua_wxTopLevelWindow_constructor1 }};
Expand Down Expand Up @@ -2395,7 +2395,7 @@ static int LUACALL wxLua_wxTopLevelWindow_constructor1(lua_State *L)
return 1;
}

#endif // (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
#endif // (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)

#if ((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
static int LUACALL wxLua_wxTopLevelWindow_constructor(lua_State *L);
Expand Down Expand Up @@ -2448,22 +2448,22 @@ static int s_wxluafunc_wxLua_wxTopLevelWindow_SetTransparent_overload_count = si

#endif // ((!wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))||((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))

#if ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))
#if ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))
// function overload table
static wxLuaBindCFunc s_wxluafunc_wxLua_wxTopLevelWindow_constructor_overload[] =
{

#if (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
#if (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)
{ wxLua_wxTopLevelWindow_constructor1, WXLUAMETHOD_CONSTRUCTOR, 3, 7, s_wxluatypeArray_wxLua_wxTopLevelWindow_constructor1 },
#endif // (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
#endif // (((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)

#if ((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
{ wxLua_wxTopLevelWindow_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, g_wxluaargtypeArray_None },
#endif // ((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)
};
static int s_wxluafunc_wxLua_wxTopLevelWindow_constructor_overload_count = sizeof(s_wxluafunc_wxLua_wxTopLevelWindow_constructor_overload)/sizeof(wxLuaBindCFunc);

#endif // ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))
#endif // ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))

void wxLua_wxTopLevelWindow_delete_function(void** p)
{
Expand Down Expand Up @@ -2584,9 +2584,9 @@ wxLuaBindMethod wxTopLevelWindow_methods[] = {
{ "ShowWithoutActivating", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTopLevelWindow_ShowWithoutActivating, 1, NULL },
#endif // (wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)

#if ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))
#if ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))
{ "wxTopLevelWindow", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTopLevelWindow_constructor_overload, s_wxluafunc_wxLua_wxTopLevelWindow_constructor_overload_count, 0 },
#endif // ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))
#endif // ((((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxPointSizeRect))||(((wxCHECK_VERSION(3,1,1)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog)) && (wxLUA_USE_wxFrame || wxLUA_USE_wxDialog))

{ 0, 0, 0, 0 },
};
Expand Down
Loading