MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pr_absent

Function pr_absent

src/pipeline/doc_links_php.c:631–640  ·  view source on GitHub ↗

A name the repository does not declare: missing inside one of its * namespaces, else external. */

Source from the content-addressed store, hash-verified

629/* A name the repository does not declare: missing inside one of its
630 * namespaces, else external. */
631static pr_res_t pr_absent(const pr_ctx_t *c, const char *fqn, size_t len) {
632 const char *bs = memchr(fqn, '\\', len);
633 char key[PR_NAME_MAX];
634 size_t rl = bs ? (size_t)(bs - fqn) : 0;
635 if (!rl || rl >= sizeof(key)) {
636 return pr_mk(PR_EXTERNAL);
637 }
638 pr_lower_into(key, fqn, rl);
639 return pr_mk(cbm_ht_get(c->ix->roots, key) ? PR_MISSING : PR_EXTERNAL);
640}
641
642/* True when the first segment of `name` is a class-use alias. */
643static bool pr_aliased(const pr_ctx_t *c, const char *name, size_t len) {

Callers 2

pr_type_ofFunction · 0.85
pr_functionFunction · 0.85

Calls 3

pr_mkFunction · 0.85
pr_lower_intoFunction · 0.85
cbm_ht_getFunction · 0.85

Tested by

no test coverage detected