MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_dict_copy

Function ghb_dict_copy

gtk/src/values.c:230–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void
231ghb_dict_copy(GhbValue *dst, const GhbValue *src)
232{
233 GhbDictIter iter;
234 const char *key;
235 GhbValue *val, *dst_val;
236
237 iter = ghb_dict_iter_init(src);
238 while (ghb_dict_iter_next(src, &iter, &key, &val))
239 {
240 dst_val = ghb_dict_get(dst, key);
241 if (ghb_value_type(val) == GHB_DICT)
242 {
243 if (dst_val == NULL || ghb_value_type(dst_val) != GHB_DICT)
244 {
245 dst_val = ghb_value_dup(val);
246 ghb_dict_set(dst, key, dst_val);
247 }
248 else if (ghb_value_type(dst_val) == GHB_DICT)
249 {
250 ghb_dict_copy(dst_val, val);
251 }
252 }
253 else
254 {
255 ghb_dict_set(dst, key, ghb_value_dup(val));
256 }
257 }
258}

Callers 3

ghb_preset_to_settingsFunction · 0.85
ghb_settings_initFunction · 0.85
ghb_prefs_to_settingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected