VERIFY( fmem );
naRef ret = fmem(hash.get_naRef()),
hash_ref = hash.get_naRef();
- VERIFY( memcmp(&ret, &hash_ref, sizeof(naRef)) == 0 );
+ VERIFY( naIsIdentical(ret, hash_ref) );
// Check if nasal::Me gets passed as self/me and remaining arguments are
// passed on to function
int naIsCode(naRef r) { return IS_CODE(r); }
int naIsCCode(naRef r) { return IS_CCODE(r); }
int naIsGhost(naRef r) { return IS_GHOST(r); }
+int naIsIdentical(naRef l, naRef r) { return IDENTICAL(l, r); }
void naSetUserData(naContext c, void* p) { c->userData = p; }
void* naGetUserData(naContext c)
int naIsFunc(naRef r) GCC_PURE;
int naIsCCode(naRef r) GCC_PURE;
+// Object equality (check for same instance, aka. pointer equality)
+int naIsIdentical(naRef l, naRef r) GCC_PURE;
+
// Allocators/generators:
naRef naNil() GCC_PURE;
naRef naNum(double num) GCC_PURE;