| 38 | } |
| 39 | |
| 40 | static int rp_node_count(cbm_store_t *store, const char *project, const char *label, |
| 41 | const char *name, const char *qn_suffix) { |
| 42 | cbm_node_t *nodes = NULL; |
| 43 | int count = 0; |
| 44 | if (cbm_store_find_nodes_by_label(store, project, label, &nodes, &count) != CBM_STORE_OK) |
| 45 | return -1; |
| 46 | int matches = 0; |
| 47 | for (int i = 0; i < count; i++) { |
| 48 | if (name && (!nodes[i].name || strcmp(nodes[i].name, name) != 0)) |
| 49 | continue; |
| 50 | if (qn_suffix && !rp_qn_ends_with(nodes[i].qualified_name, qn_suffix)) |
| 51 | continue; |
| 52 | matches++; |
| 53 | } |
| 54 | cbm_store_free_nodes(nodes, count); |
| 55 | return matches; |
| 56 | } |
| 57 | |
| 58 | static int rp_edge_count(cbm_store_t *store, const char *project, const char *edge_type, |
| 59 | const char *source_name, const char *target_label, const char *target_name, |
no test coverage detected