I think this should either be
((pm = (Param)paramtab->getnode(paramtab, asg->value.scalar))
That's almost what I do in the
second patch in my message
PATCHes: fix reference checks in bin_typeset (it uses realparamtab instead of paramtab). It is however built on top of the
first patch in that message. When I apply these two patches at bde2b183f and switch to paramtab, all tests pass. If I apply only the second patch and switch to paramtab: all tests pass. Among the commits that came after bde2b183f, none changed any C file. Could the error be caused by one of your local changes?
I can try to exclude some of these patches but I think that at least some of them are vital.
Extra questions
- Should builtin.c:3132 do the same gimmick as
here (and a few other places in builtin.c)?
- I used realparamtab because the line previously called resolve_nameref, which uses realparamtab
here and
here. Should resolve_nameref use paramtab, too?
I'm actually surprised that "typeset" could possibly apply to something else than the real parameter table but obviously the code in builtin thinks differently.
- It uses a constant "false" which appears nowhere else in our sources.
I can replace "false" and "true" with "0" and "1". In case I should use/do something else, let me know.
- we have been following the practice of always declaring variables at
the start of a code block, even though it's not strictly necessary
with modern compilers.
I will adapt my code to conform.
Philippe