Strategy 2: Same-module match */
| 719 | |
| 720 | /* Strategy 2: Same-module match */ |
| 721 | static cbm_resolution_t resolve_same_module(const cbm_registry_t *r, const char *callee_name, |
| 722 | const char *suffix, const char *module_qn) { |
| 723 | char candidate[CBM_SZ_512]; |
| 724 | snprintf(candidate, sizeof(candidate), "%s.%s", module_qn, callee_name); |
| 725 | const char *stored_key = cbm_ht_get_key(r->exact, candidate); |
| 726 | if (stored_key) { |
| 727 | return (cbm_resolution_t){stored_key, "same_module", CONF_SAME_MODULE, REG_RESOLVED}; |
| 728 | } |
| 729 | if (suffix && suffix[0]) { |
| 730 | snprintf(candidate, sizeof(candidate), "%s.%s", module_qn, suffix); |
| 731 | stored_key = cbm_ht_get_key(r->exact, candidate); |
| 732 | if (stored_key) { |
| 733 | return (cbm_resolution_t){stored_key, "same_module", CONF_SAME_MODULE, REG_RESOLVED}; |
| 734 | } |
| 735 | } |
| 736 | return empty_result(); |
| 737 | } |
| 738 | |
| 739 | /* Strategy 4: multiple candidates with import filtering. */ |
| 740 | static cbm_resolution_t resolve_multi_with_imports(const qn_array_t *arr, const char *module_qn, |
no test coverage detected