ctable: hash COBJ_CFUNCTION based on cfunc and not the actual <obj>

This commit is contained in:
CPunch 2023-12-28 19:56:05 -06:00
parent e7b2d7d833
commit 0df56bd42a

View File

@ -69,6 +69,8 @@ static uint32_t getObjectHash(CObj *obj)
switch (obj->type) { switch (obj->type) {
case COBJ_STRING: case COBJ_STRING:
return ((CObjString *)obj)->hash; return ((CObjString *)obj)->hash;
case COBJ_CFUNCTION:
return (uint32_t)((CObjCFunction *)obj)->cfunc;
default: default:
return (uint32_t)obj; // just "hash" the pointer return (uint32_t)obj; // just "hash" the pointer
} }