No fixed result buffer and no call to the implementation's member predicate. */
| 4315 | |
| 4316 | /* No fixed result buffer and no call to the implementation's member predicate. */ |
| 4317 | static bool pylsp_range_oracle(const CBMTypeRegistry *reg, bool types, const char *prefix, |
| 4318 | bool direct, CBMArena *scratch, uint64_t *visits) { |
| 4319 | CBMQNPrefixIter it; |
| 4320 | bool opened = types ? cbm_registry_types_with_qn_prefix(reg, prefix, direct, scratch, &it) |
| 4321 | : cbm_registry_funcs_with_qn_prefix(reg, prefix, direct, scratch, &it); |
| 4322 | if (!opened) |
| 4323 | return false; |
| 4324 | int total = reg ? (types ? reg->type_count : reg->func_count) : 0; |
| 4325 | bool ok = true; |
| 4326 | for (int i = 0; i < total; i++) { |
| 4327 | const char *qn = types ? reg->types[i].qualified_name : reg->funcs[i].qualified_name; |
| 4328 | if (pylsp_range_member(qn, prefix, direct)) |
| 4329 | ok = cbm_qn_prefix_iter_next(&it) == i && ok; |
| 4330 | } |
| 4331 | ok = cbm_qn_prefix_iter_next(&it) == -1 && cbm_qn_prefix_iter_next(&it) == -1 && ok; |
| 4332 | if (visits) |
| 4333 | *visits = it.visits; |
| 4334 | return ok; |
| 4335 | } |
| 4336 | |
| 4337 | static void pylsp_range_reset_failures(void) { |
| 4338 | cbm_registry_test_type_qn_order_fail_after(-1); |
no test coverage detected