next up previous contents
Next: 11.6 fluke_ref_copy: make a Up: 11 References Previous: 11.4 fluke_ref_check: determine if

11.5 fluke_ref_compare: determine if two references are equivalent

SYNOPSIS

int fluke_ref_compare(fluke_ref_t *ref1, fluke_ref_t *ref2);

DESCRIPTION

This function determines if the given references are equivalent, returning true (nonzero) if they refer to the same Fluke object, or false if they do not. A null reference is never equivalent to any non-null reference; however, comparing two null references returns an undefined result.

PARAMETERS

ref1
One reference object to compare.
ref2
The other reference object to compare.

RETURNS

Returns non-zero if the references are equivalent, zero if not.

ERRORS

If any of the following errors is detected by the Fluke implementation, it causes the current thread to take a synchronous exception with one of the following codes. All of these have an implicit FLUKE_INSANITY_ prefix.
NO_OBJECT
ref1 or ref2 does not point to an active object.
NOT_REF
The object pointed to by ref1 or ref2 is not a reference object.
INVALID_OBJECT
The state of ref1 or ref2 has become invalid.



Utah Flux Research Group