`fqn` of a declared short name in the current block. */
| 590 | |
| 591 | /* `fqn` of a declared short name in the current block. */ |
| 592 | static const char *php_fqn(php_walk_t *w, const char *name, size_t len, size_t *out_len) { |
| 593 | if (!w->ns_len) { |
| 594 | *out_len = len; |
| 595 | return name; |
| 596 | } |
| 597 | char *s = cbm_arena_sprintf(w->sb->a, "%.*s\\%.*s", (int)w->ns_len, w->ns, (int)len, name); |
| 598 | if (!s) { |
| 599 | w->sb->oom = true; |
| 600 | *out_len = 0; |
| 601 | return ""; |
| 602 | } |
| 603 | *out_len = strlen(s); |
| 604 | return s; |
| 605 | } |
| 606 | |
| 607 | static char php_dup_flag(php_walk_t *w, const char *name) { |
| 608 | uintptr_t count = (uintptr_t)cbm_ht_get(w->names, name); |
no test coverage detected