object: introduce get_object_hash macro.