From 0df56bd42a00d0825c2d2935e1e094b3cdba882b Mon Sep 17 00:00:00 2001 From: CPunch Date: Thu, 28 Dec 2023 19:56:05 -0600 Subject: [PATCH] ctable: hash COBJ_CFUNCTION based on cfunc and not the actual --- src/ctable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ctable.c b/src/ctable.c index 1fca3da..90f8c31 100644 --- a/src/ctable.c +++ b/src/ctable.c @@ -69,6 +69,8 @@ static uint32_t getObjectHash(CObj *obj) switch (obj->type) { case COBJ_STRING: return ((CObjString *)obj)->hash; + case COBJ_CFUNCTION: + return (uint32_t)((CObjCFunction *)obj)->cfunc; default: return (uint32_t)obj; // just "hash" the pointer }