Compare two dictionaries
#include <strm.h> strm_dict_t *strm_dict_compare( strm_dict_t *newdict, strm_dict_t const *olddict );
- A handle to the newer version of a dictionary object.
- A handle to the older version of a dictionary object.
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).
A dictionary handle to the dictionary object containing the result of the comparison, or a null pointer on failure.
Last modified: 2013-09-30