mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-27 17:30:06 +00:00
ctable: hash COBJ_CFUNCTION based on cfunc and not the actual <obj>
This commit is contained in:
parent
e7b2d7d833
commit
0df56bd42a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user