Find the REFERENCES_FILE edge between two node ids. NULL if absent. */
| 45 | |
| 46 | /* Find the REFERENCES_FILE edge between two node ids. NULL if absent. */ |
| 47 | static const cbm_gbuf_edge_t *find_ref_edge(cbm_gbuf_t *gb, int64_t src, int64_t tgt) { |
| 48 | const cbm_gbuf_edge_t **edges = NULL; |
| 49 | int count = 0; |
| 50 | cbm_gbuf_find_edges_by_type(gb, "REFERENCES_FILE", &edges, &count); |
| 51 | for (int i = 0; i < count; i++) { |
| 52 | if (edges[i]->source_id == src && edges[i]->target_id == tgt) { |
| 53 | return edges[i]; |
| 54 | } |
| 55 | } |
| 56 | return NULL; |
| 57 | } |
| 58 | |
| 59 | /* True when the edge's props JSON carries the given strategy. */ |
| 60 | static bool edge_has_strategy(const cbm_gbuf_edge_t *e, const char *strategy) { |
no test coverage detected