Count exact-name nodes without depending on project-prefixed qualified names. * Export-XML relationship tests use this as an anti-vacuous guard: the * transcoded methods must exist even when their extracted relationships were * accidentally discarded. */
| 1157 | * transcoded methods must exist even when their extracted relationships were |
| 1158 | * accidentally discarded. */ |
| 1159 | static int named_node_count(cbm_store_t *s, const char *project, const char *name) { |
| 1160 | cbm_node_t *nodes = NULL; |
| 1161 | int count = 0; |
| 1162 | if (cbm_store_find_nodes_by_name(s, project, name, &nodes, &count) != CBM_STORE_OK) { |
| 1163 | return -1; |
| 1164 | } |
| 1165 | if (nodes) { |
| 1166 | cbm_store_free_nodes(nodes, count); |
| 1167 | } |
| 1168 | return count; |
| 1169 | } |
| 1170 | |
| 1171 | typedef struct { |
| 1172 | int run_rc; |
no test coverage detected