strm_dict_compare()

Compare two dictionaries

Synopsis:

#include <strm.h>

strm_dict_t *strm_dict_compare( strm_dict_t *newdict,
                                strm_dict_t const *olddict );

Arguments:

newdict
A handle to the newer version of a dictionary object.
olddict
A handle to the older version of a dictionary object.

Library:

libstrm

Description:

The function strm_dict_compare() compares two dictionaries. It creates a replica of newdict and removes all those entries that also exist in olddict and have the same value. In other words, if olddict is the older version of some dictionary and newdict is the newer version, the resulting dictionary contains the entries that were changed or added, but not the ones that were left alone or deleted. If the same handle is passed for both arguments, this function returns an empty dictionary object.

Note that the newdict handle is closed and becomes invalid after calling this function, even on a failure, but the olddict handle is not (unless it's the same handle).

Returns:

A dictionary handle to the dictionary object containing the result of the comparison, or a null pointer on failure.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes