Strategy 2: Same-module match */
| 675 | |
| 676 | /* Strategy 2: Same-module match */ |
| 677 | static cbm_resolution_t resolve_same_module(const cbm_registry_t *r, const char *callee_name, |
| 678 | const char *suffix, const char *module_qn) { |
| 679 | char candidate[CBM_SZ_512]; |
| 680 | snprintf(candidate, sizeof(candidate), "%s.%s", module_qn, callee_name); |
| 681 | const char *stored_key = cbm_ht_get_key(r->exact, candidate); |
| 682 | if (stored_key) { |
| 683 | return (cbm_resolution_t){stored_key, "same_module", CONF_SAME_MODULE, REG_RESOLVED}; |
| 684 | } |
| 685 | if (suffix && suffix[0]) { |
| 686 | snprintf(candidate, sizeof(candidate), "%s.%s", module_qn, suffix); |
| 687 | stored_key = cbm_ht_get_key(r->exact, candidate); |
| 688 | if (stored_key) { |
| 689 | return (cbm_resolution_t){stored_key, "same_module", CONF_SAME_MODULE, REG_RESOLVED}; |
| 690 | } |
| 691 | } |
| 692 | return empty_result(); |
| 693 | } |
| 694 | |
| 695 | /* Strategy 4: multiple candidates with import filtering. */ |
| 696 | static cbm_resolution_t resolve_multi_with_imports(const qn_array_t *arr, const char *module_qn, |
no test coverage detected