| 4680 | } |
| 4681 | |
| 4682 | static bool cmm_hook_outer_is_canonical(yyjson_mut_val *entry, bool has_matcher) { |
| 4683 | if (!entry || !yyjson_mut_is_obj(entry) || |
| 4684 | yyjson_mut_obj_size(entry) != (has_matcher ? 2U : 1U)) { |
| 4685 | return false; |
| 4686 | } |
| 4687 | yyjson_mut_val *hooks = yyjson_mut_obj_get(entry, "hooks"); |
| 4688 | yyjson_mut_val *matcher = yyjson_mut_obj_get(entry, "matcher"); |
| 4689 | return hooks && yyjson_mut_is_arr(hooks) && |
| 4690 | (!has_matcher || (matcher && yyjson_mut_is_str(matcher))); |
| 4691 | } |
| 4692 | |
| 4693 | static size_t remove_all_owned_hooks_from_event(yyjson_mut_val *event_arr, const char *matcher_str, |
| 4694 | const char *const *old_matchers, |
no outgoing calls
no test coverage detected