Open
Conversation
added 4 commits
February 12, 2018 12:54
This patch fixes cases where the 'opts' table passed by the user is modified, making the external table unable to be reused in some cases. This was causing problems e.g. when dealing with properties, as the user was having a predefined dbus options table, as the "interface" key was changed internally to 'org.freedesktop.DBus.Properties' without being changed back on return.
"append_arg" was broken for some nested types like "a{sa{sv}}" on the
ldbus backend. This reimplements append_arg, fixing the bugs.
On the ldbus backend the function dbus.new_variant has been added.
This allows overriding the variant type autodetection for types not
expressable as arguments on the LUA type system, e.g. 'o', which gets
translated to string.
Note that this function gets available as dbus.raw.new_variant
Example usage:
local variant = dbus.raw.new_variant
myvariant = {
'v',
variant('aa{sv}', {
{ k1 = 'v1' }, --val is string variant (autodetected)
{ k2 = variant ('o', '/some/dbus/path')}
})
}
on the ldbus backend "iter_args" was completely broken for complex
types, calling a function returning "a{sa{sv}}" like e.g.
"org.freedesktop.NetworkmManager.Settings.Connection.GetSettings"
failed completely.
This patch reimplements "iter_args" correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch fixes cases where the 'opts' table passed by the user is
modified, making the external table unable to be reused in some
cases.
This was causing problems e.g. when dealing with properties, as the
user was having a predefined dbus options table, as the "interface"
key was changed internally to 'org.freedesktop.DBus.Properties'
without being changed back on return.