diff options
Diffstat (limited to 'byterun/hash.c')
-rw-r--r-- | byterun/hash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/byterun/hash.c b/byterun/hash.c index b71ae6c0e..af756eaf2 100644 --- a/byterun/hash.c +++ b/byterun/hash.c @@ -15,6 +15,7 @@ /* The generic hashing primitive */ #include "mlvalues.h" +#include "custom.h" #include "memory.h" static unsigned long hash_accu; @@ -96,7 +97,6 @@ static void hash_aux(value obj) } break; case Abstract_tag: - case Final_tag: /* We don't know anything about the contents of the block. Better do nothing. */ break; @@ -107,6 +107,13 @@ static void hash_aux(value obj) hash_univ_count--; Combine(Oid_val(obj)); break; + case Custom_tag: + /* If no hashing function provided, do nothing */ + if (Custom_ops_val(obj)->hash != NULL) { + hash_univ_count--; + Combine(Custom_ops_val(obj)->hash(obj)); + } + break; default: hash_univ_count--; Combine_small(tag); |