Skip to content

zb: args in match rules don't need to be contiguous

Zeeshan Ali Khan requested to merge zeenix/zbus:fix-match-rule-args into main

This commit fixes the API and handling of argN and argNpath in match rules. We were assuming that they've to be contiguous but that's not true. One can set a condition on any arg at any index.

This means an API break but:

  • We just introduced the API in the last release so chances of someone using it directly are very low.
  • If anyone was using the changed API, they were likely in trouble anyway.
  • We avoid breaking the main API by keeping MatchRuleBuilder::{add_arg, add_arg_path} the same and adding new methods for adding args at a specific index.
  • The API that is breaking is mostly going to be useful for bus implementations and there is hardly one yet.
Edited by Zeeshan Ali Khan

Merge request reports

Loading