htri_t
ss_pers_equal(ss_pers_t *pers1,
ss_pers_t *pers2,
ss_prop_t UNUSED *props /* A property list to indicate how the comparison should proceed. No properties
* are currently defined. If an object contains persistent object links then the
* pointed-to objects will be compared with ss_pers_eq() instead of recursively
* calling ss_pers_equal(). */
)
{
SS_ENTER(ss_pers_equal, htri_t);
int cmp=-1;
static char mask[1024];
static int ncalls;
/* Build the mask used to compare the two objects. */
if (0==ncalls++) {
#ifndef NDEBUG
int i;
for (i=0; i<SS_PERS_NCLASSES; i++) {
SS_ASSERT(ss_pers_class_g[i].t_size<=sizeof mask);
}
#endif
memset(mask, SS_VAL_CMP_DFLT, sizeof mask);
}
if (-2==(cmp=ss_pers_cmp(pers1, pers2, (ss_persobj_t*)mask))) SS_ERROR(FAILED);
SS_CLEANUP:
SS_LEAVE(0==cmp);
}