Compares two persistent objects¶
ss_pers_cmp_
is a function defined in sspers.c.
Synopsis:
-
int
ss_pers_cmp_
(ss_persobj_t *p1, ss_persobj_t *p2, const ss_persobj_t *mask)¶
Formal Arguments:
p1
: First of two objects to compare. This is normally considered to be the “haystack”.p2
: Second of two objects to compare. This is normally considered to be the “needle” and might contain special things like regular expressions, etc. depending on the values contained in themask
.mask
: Which elements ofP1
andP2
to compare. This isn’t really a true object but rather a chunk of memory the same size as the objects that is filled with bytes that say which members ofP1
andP2
to compare and how to compare them.
Description: This is an internal version of ss_pers_cmp and does only a deep comparison of the two objects.
Return Value: On success returns -1, 0, or 1 depending on whether P1
is less than, equal, or greater than P2
by some
arbitrary but consistent comparison algorithm. Returns -2 on failure.
Parallel Notes: Independent
See Also:
- ss_pers_cmp: 7.15: Compares two persistent objects
- Persistent Objects: Introduction for current chapter