diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fb139d0..51b0234b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - version: [5.1.5, 5.2.4, 5.3.6, 5.4.7] + version: [5.1.5, 5.2.4, 5.3.6, 5.4.7, 5.5.0] env: LUA_VERSION: ${{ matrix.version }} diff --git a/.github/workflows/msvc-ci.yml b/.github/workflows/msvc-ci.yml index 0d5abe05..303c0d9e 100644 --- a/.github/workflows/msvc-ci.yml +++ b/.github/workflows/msvc-ci.yml @@ -19,6 +19,7 @@ jobs: - 5.2.4 - 5.3.6 - 5.4.7 + - 5.5.0 gtk-major-version: - 3 diff --git a/lgi/component.lua b/lgi/component.lua index a6803ae1..34d08d94 100644 --- a/lgi/component.lua +++ b/lgi/component.lua @@ -64,9 +64,10 @@ function component.get_category(children, xform_value, -- Load all known indices. for en, idx in pairs(index) do + local e = en val = xvalue(children[idx]) - en = not xform_name_reverse and en or xform_name_reverse(en) - if en then category[en] = val end + e = not xform_name_reverse and e or xform_name_reverse(e) + if e then category[e] = val end end -- Metatable is no longer needed, disconnect it. diff --git a/lgi/override/GObject-Object.lua b/lgi/override/GObject-Object.lua index 8bda1e17..7aa25ef7 100644 --- a/lgi/override/GObject-Object.lua +++ b/lgi/override/GObject-Object.lua @@ -73,10 +73,10 @@ function Object:_construct(gtype, param, owns) local parameters, others, safe = {}, {}, {} for name, arg in pairs(param or {}) do if type(name) == 'string' then - local argtype = self[name] + local argtype = self[name] if gi.isinfo(argtype) and argtype.is_property then local parameter = core.record.new(parameter_repo) - name = argtype.name + local propname = argtype.name local value = parameter.value -- Store the name string in some safe Lua place ('safe' @@ -84,10 +84,10 @@ function Object:_construct(gtype, param, owns) -- only non-owning pointer to the string, and it could be -- Lua-GC'ed while still referenced by GParameter -- instance. - safe[#safe + 1] = name + safe[#safe + 1] = propname safe[#safe + 1] = value - parameter.name = name + parameter.name = propname local gtype = Type.from_typeinfo(argtype.typeinfo) Value.init(value, gtype) local marshaller = Value.find_marshaller(gtype, argtype.typeinfo) diff --git a/lgi/override/GObject-Value.lua b/lgi/override/GObject-Value.lua index f6213887..ec8f9e98 100644 --- a/lgi/override/GObject-Value.lua +++ b/lgi/override/GObject-Value.lua @@ -84,9 +84,9 @@ end local value_marshallers = {} for name, gtype in pairs(Type) do - name = core.downcase(name) - local get = Value['get_' .. name] - local set = Value['set_' .. name] + local n = core.downcase(name) + local get = Value['get_' .. n] + local set = Value['set_' .. n] if get and set then value_marshallers[gtype] = function(value, params, ...) @@ -113,9 +113,9 @@ end -- Override marshallers for enums and bitmaps, marshal them as strings -- or sets of string flags. for name, gtype in pairs { ENUM = Type.ENUM, FLAGS = Type.FLAGS } do - name = core.downcase(name) - local get = Value._method['get_' .. name] - local set = Value._method['set_' .. name] + local n = core.downcase(name) + local get = Value._method['get_' .. n] + local set = Value._method['set_' .. n] value_marshallers[gtype] = function(value, params, ...) local rtype if select('#', ...) > 0 then diff --git a/lgi/override/Gtk.lua b/lgi/override/Gtk.lua index 1812a6fb..a4c714cd 100644 --- a/lgi/override/Gtk.lua +++ b/lgi/override/Gtk.lua @@ -339,9 +339,9 @@ end local function treemodel_prepare_values(model, values) local cols, vals = {}, {} for column, value in pairs(values) do - column = column - 1 - cols[#cols + 1] = column - vals[#vals + 1] = GObject.Value(model:get_column_type(column), value) + local col = column - 1 + cols[#cols + 1] = col + vals[#vals + 1] = GObject.Value(model:get_column_type(col), value) end return cols, vals end