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

Function pr_parent

src/pipeline/doc_links_php.c:660–669  ·  view source on GitHub ↗

The superclass of type ti, as a type of the index. */

Source from the content-addressed store, hash-verified

658
659/* The superclass of type ti, as a type of the index. */
660static pr_res_t pr_parent(const pr_ctx_t *c, int ti) {
661 const pr_type_t *t = &c->ix->types[ti];
662 for (int i = 0; i < t->nbases; i++) {
663 if (t->bases[i].rel == 'e' && t->bases[i].fqn) {
664 pr_res_t r = pr_find_type(c, t->bases[i].fqn, strlen(t->bases[i].fqn));
665 return r.kind == PR_NONE ? pr_mk(PR_EXTERNAL) : r;
666 }
667 }
668 return pr_mk(PR_MISSING);
669}
670
671/* The type a reference's type part names. */
672static pr_res_t pr_type_of(const pr_ctx_t *c, const pr_ref_t *r) {

Callers 1

pr_type_ofFunction · 0.85

Calls 2

pr_find_typeFunction · 0.85
pr_mkFunction · 0.85

Tested by

no test coverage detected