...
+void
+virNodeDeviceObjListForEachSafe(virNodeDeviceObjListPtr devs,
+ virNodeDeviceObjListIterator iter,
+ const void *opaque)
+{
+ struct _virNodeDeviceObjListForEachData data = {
+ .iter = iter,
+ .opaque = opaque
+ };
+
+ virObjectRWLockWrite(devs);
+ virHashForEachSafe(devs->objs, virNodeDeviceObjListForEachCb, &data);
I just checked out virHashForEachSafe and virHashForEach says the latter is
deprecated while the use of the former in new code should be rewritten with
GLib, which translates to the use of g_hash_table_foreach_remove().
Erik