Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/msvc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- 5.2.4
- 5.3.6
- 5.4.7
- 5.5.0

gtk-major-version:
- 3
Expand Down
5 changes: 3 additions & 2 deletions lgi/component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions lgi/override/GObject-Object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,21 @@ 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'
-- table), because param is GParameter, which contains
-- 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)
Expand Down
12 changes: 6 additions & 6 deletions lgi/override/GObject-Value.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...)
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lgi/override/Gtk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading