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

Apteryx uniqify tree #436

Merged
merged 7 commits into from
Oct 23, 2024
Merged

Apteryx uniqify tree #436

merged 7 commits into from
Oct 23, 2024

Conversation

blairsteven
Copy link
Contributor

No description provided.

Add a function to remove duplicate values from a tree - as a side effect
this will sort each level of the tree in alphabetic order.
apteryx_query has an unusual behaviour in that some advanced queries can
generate a tree with duplicate nodes. Remove these with
apteryx_uniqify_tree.
This allows the g_node_prepend done in  _rpc_msg_decode_tree to
reassemble the tree in the same order as it was originally without being
O(n*n).
Instated a check that now passes, made another test do what was
intended.
Ensure a client setting up multiple values for the same key in a tree
ends up with the last value actually being used. There are ways of doing
this setup which will end up with the wrong value being set (requiring a
mix of methods to create the tree), but this will work when
APTERYX_VALUE / APTERYX_NODE is used the same way multiple times to
create a tree with duplicate nodes.
@carlgsmith carlgsmith merged commit 4aec22a into master Oct 23, 2024
1 check passed
@carlgsmith carlgsmith deleted the apteryx_uniqify_tree branch October 23, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants