| 3515 | } |
| 3516 | |
| 3517 | static bool compare_node_callback(void *context, bool added, |
| 3518 | const cbm_graph_node_identity_t *node) { |
| 3519 | compare_response_t *response = (compare_response_t *)context; |
| 3520 | compare_result_set_t *set = added ? &response->nodes_added : &response->nodes_removed; |
| 3521 | if (set->returned >= response->limit || set->budget_exhausted) { |
| 3522 | return true; |
| 3523 | } |
| 3524 | yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL); |
| 3525 | yyjson_mut_val *item = doc ? compare_node_json(doc, node) : NULL; |
| 3526 | if (doc && item) { |
| 3527 | yyjson_mut_doc_set_root(doc, item); |
| 3528 | } |
| 3529 | return compare_append_item(response, set, doc, item); |
| 3530 | } |
| 3531 | |
| 3532 | static bool compare_edge_callback(void *context, bool added, |
| 3533 | const cbm_graph_edge_identity_t *edge) { |
nothing calls this directly
no test coverage detected