The key of one unit step: everything it reads. false when it does not fit. */
| 4827 | |
| 4828 | /* The key of one unit step: everything it reads. false when it does not fit. */ |
| 4829 | static bool unit_key(char *buf, size_t cap, const cs_ctx_t *c, const cs_query_t *q) { |
| 4830 | int n = snprintf(buf, cap, "%d|%d|%d|%d|%d%d%d%c|%s", c->unit, c->group, (int)c->prod, q->arity, |
| 4831 | (int)q->types_only, (int)q->statics, (int)q->ctors, q->kind ? q->kind : '-', |
| 4832 | q->name); |
| 4833 | return n > 0 && (size_t)n < cap; |
| 4834 | } |
| 4835 | |
| 4836 | /* The step under `key` (the caller holds the memo's lock); a new one is |
| 4837 | * added with its lock held, and *mine set: the caller finds its list. NULL |