Browse Source

Compare symbols by their name not by their address to prevent non-determinism.

master
Ian Piumarta 2 years ago
parent
commit
eb85a1fb75
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/object.c

+ 2
- 0
src/object.c View File

@ -427,6 +427,8 @@ int oopcmp(oop a, oop b)
}
case String:
return strcmp(get(a, String, value), get(b, String, value));
case Symbol:
return strcmp(get(a, Symbol, name), get(b, Symbol, name));
default: {
intptr_t l= (intptr_t)a, r= (intptr_t)b;
if (l < r) return -1;

Loading…
Cancel
Save