summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-19 20:11:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-20 16:17:19 -0800
commit4caf98c502bf3cc80e20dba74eb941f50b58216e (patch)
tree13c3142d44c4135922aa18b4b9dd585543473fba /hash.c
parent08bded98e1e3dc9580e9e19332ca228b320b659a (diff)
downloadtxr-4caf98c502bf3cc80e20dba74eb941f50b58216e.tar.gz
txr-4caf98c502bf3cc80e20dba74eb941f50b58216e.tar.bz2
txr-4caf98c502bf3cc80e20dba74eb941f50b58216e.zip
Fix buggy less function.
Allowing rankings among types which documentation says are not comparable. * lib.c (enum less_handling): New enum. (less_tab): Elements are values of the less_handling enum. (less_tab_init): Entries are renumbered. Everything that was given precedence 5 or higher is now zero: not comparable. Precedences 0 to 4 remap to 1 to 5. less_tab is populated differently, since there are four values now. If either the left or right type has 0 precedence, the value is less_cannot: comparison is not possible. (less): Only a less_tab value of less_compare now passes control through to the switch statement. The less_cannot value shortcuts to a cannot compare error. Types that cannot occur in the switch now are removed, and a default case goes to internal error.
Diffstat (limited to 'hash.c')
0 files changed, 0 insertions, 0 deletions