{
g_autoptr(GHashTable) ret = NULL;
- ret = virHashNew((virHashDataFree) qemuMonitorJSONBlockNamedNodeDataFree);
+ ret = virHashNew((GDestroyNotify) qemuMonitorJSONBlockNamedNodeDataFree);
if (virJSONValueArrayForeachSteal(nodes,
qemuMonitorJSONBlockGetNamedNodeDataWorker,
* Returns the newly created object.
*/
GHashTable *
-virHashNew(virHashDataFree dataFree)
+virHashNew(GDestroyNotify dataFree)
{
ignore_value(virHashTableSeedInitialize());
virHashAtomic *
-virHashAtomicNew(virHashDataFree dataFree)
+virHashAtomicNew(GDestroyNotify dataFree)
{
virHashAtomic *hash;
* function types:
*/
-/**
- * virHashDataFree:
- * @payload: the data in the hash
- *
- * Callback to free data from a hash.
- */
-typedef void (*virHashDataFree) (void *payload);
-
/**
* virHashIterator:
* @payload: the data in the hash
/*
* Constructor and destructor.
*/
-GHashTable *virHashNew(virHashDataFree dataFree) G_GNUC_WARN_UNUSED_RESULT;
-virHashAtomic *virHashAtomicNew(virHashDataFree dataFree);
+GHashTable *virHashNew(GDestroyNotify dataFree) G_GNUC_WARN_UNUSED_RESULT;
+virHashAtomic *virHashAtomicNew(GDestroyNotify dataFree);
ssize_t virHashSize(GHashTable *table);
/*
* @name: ignored, name of the hash key being deleted
*
* Provides identical functionality to virObjectUnref,
- * but with the signature matching the virHashDataFree
- * typedef.
+ * but with the signature matching the GDestroyNotify
+ * typedef used with hash tables.
*/
void
virObjectFreeHashData(void *opaque)