You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code, at least for ldbus, seems to derive the actual type of a variant at runtime. This however means certain types, in particular numerical types, cannot be expressed. Additionally, considering properties are implemented with a Get that returns a variant, properties aren't actually of the type they claim to be, nor are they ever typechecked.
The text was updated successfully, but these errors were encountered:
For now I've monkeypatched it in my own code using the following:
local orig_append = luadbus.raw.append_arg
function luadbus.raw.append_arg(iter, value, typ, subtyp)
if typ == "v" and type(value) == "function" then
value, subtyp = value()
local subiter = iter:open_container("v", subtyp)
luadbus.raw.append_arg(subiter, value, subtyp)
iter:close_container(subiter)
return
end
return orig_append(iter, value, typ, subtyp)
end
This allows a variant to be a function, returning the value then the type. Not the cleanest solution, but it works for now. Of course it still requires things like the Properties interface to be updated, or the read function returning such a functio
The current code, at least for ldbus, seems to derive the actual type of a variant at runtime. This however means certain types, in particular numerical types, cannot be expressed. Additionally, considering properties are implemented with a Get that returns a variant, properties aren't actually of the type they claim to be, nor are they ever typechecked.
The text was updated successfully, but these errors were encountered: