diff options
| author | 2023-06-04 10:50:54 +0200 | |
|---|---|---|
| committer | 2023-06-04 10:50:54 +0200 | |
| commit | 9201488618d7f9a51689d7369132223b286004c2 (patch) | |
| tree | 5ba6ec8012123300dd2ea6536e3134d04634bf54 /type.c | |
| parent | 2075cfc9b395b413de1a540f6262e7b994907bee (diff) | |
support calling undeclared functions
Diffstat (limited to 'type.c')
| -rw-r--r-- | type.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -8,6 +8,7 @@ static ushort hashtd(const struct typedata *td) { uint h = td->t*33; + bool t; switch (td->t) { case TYARRAY: h = hashb(h, &td->arrlen, sizeof td->arrlen); @@ -23,6 +24,8 @@ hashtd(const struct typedata *td) case TYFUNC: h = hashb(h, &td->ret, sizeof td->ret); h = hashb(h, &td->nmemb, sizeof td->nmemb); + h = hashb(h, (t = td->kandr, &t), sizeof t); + h = hashb(h, (t = td->variadic, &t), sizeof t); for (int i = 0; i < td->nmemb; ++i) { uchar q = tdgetqual(td->quals, i); h = hashb(h, &td->param[i], sizeof *td->param); @@ -52,6 +55,7 @@ tdequ(const struct typedata *a, const struct typedata *b) if (a->ret.bits != b->ret.bits) return 0; if (a->nmemb != b->nmemb) return 0; if (a->variadic != b->variadic) return 0; + if (a->kandr != b->kandr) return 0; for (int i = 0; i < a->nmemb; ++i) { if (!a->quals != !b->quals || a->param[i].bits != b->param[i].bits) return 0; |