]> code.delx.au - pulseaudio/commitdiff
idxset: Use pa_free_cb_t instead of pa_free2_cb_t
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 12 Feb 2013 19:36:55 +0000 (21:36 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 15 Feb 2013 23:15:27 +0000 (01:15 +0200)
There were no users for the userdata pointer.

27 files changed:
src/modules/alsa/alsa-mixer.c
src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-ucm.c
src/modules/dbus/module-dbus-protocol.c
src/modules/module-combine-sink.c
src/modules/module-device-manager.c
src/modules/module-device-restore.c
src/modules/module-role-cork.c
src/modules/module-role-ducking.c
src/modules/module-stream-restore.c
src/pulse/format.c
src/pulse/internal.h
src/pulsecore/card.c
src/pulsecore/client.c
src/pulsecore/core.c
src/pulsecore/idxset.c
src/pulsecore/idxset.h
src/pulsecore/protocol-cli.c
src/pulsecore/protocol-dbus.c
src/pulsecore/protocol-esound.c
src/pulsecore/protocol-http.c
src/pulsecore/protocol-native.c
src/pulsecore/protocol-simple.c
src/pulsecore/sink-input.c
src/pulsecore/sink.c
src/pulsecore/source-output.c
src/pulsecore/source.c

index 395ee2c8a428c50409c11d9b090785fbd48fb854..881d13de216598cbc45754c0672dd7fcc44d7f95 100644 (file)
@@ -449,7 +449,7 @@ static void setting_free(pa_alsa_setting *s) {
     pa_assert(s);
 
     if (s->options)
-        pa_idxset_free(s->options, NULL, NULL);
+        pa_idxset_free(s->options, NULL);
 
     pa_xfree(s->name);
     pa_xfree(s->description);
@@ -3289,10 +3289,10 @@ static void profile_free(pa_alsa_profile *p) {
     pa_xstrfreev(p->output_mapping_names);
 
     if (p->input_mappings)
-        pa_idxset_free(p->input_mappings, NULL, NULL);
+        pa_idxset_free(p->input_mappings, NULL);
 
     if (p->output_mappings)
-        pa_idxset_free(p->output_mappings, NULL, NULL);
+        pa_idxset_free(p->output_mappings, NULL);
 
     pa_xfree(p);
 }
index 03434f9e7cb54e9e4258bbe9bd37b25510c6f962..69d006e705c84b19c48f9fe169ee7d28124d511f 100644 (file)
@@ -1547,7 +1547,7 @@ static pa_bool_t sink_set_formats(pa_sink *s, pa_idxset *formats) {
             return FALSE;
     }
 
-    pa_idxset_free(u->formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+    pa_idxset_free(u->formats, (pa_free_cb_t) pa_format_info_free);
     u->formats = pa_idxset_new(NULL, NULL);
 
     /* Note: the logic below won't apply if we're using software encoding.
@@ -2455,7 +2455,7 @@ static void userdata_free(struct userdata *u) {
         pa_smoother_free(u->smoother);
 
     if (u->formats)
-        pa_idxset_free(u->formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(u->formats, (pa_free_cb_t) pa_format_info_free);
 
     if (u->rates)
         pa_xfree(u->rates);
index 9e62dcb388efb823fb154b4e6dc94a78c11f55f9..e01721f0d200fa855eaae56d1486dd8b999a6786 100644 (file)
@@ -1498,9 +1498,9 @@ static void free_verb(pa_alsa_ucm_verb *verb) {
         PA_LLIST_REMOVE(pa_alsa_ucm_device, verb->devices, di);
         pa_proplist_free(di->proplist);
         if (di->conflicting_devices)
-            pa_idxset_free(di->conflicting_devices, NULL, NULL);
+            pa_idxset_free(di->conflicting_devices, NULL);
         if (di->supported_devices)
-            pa_idxset_free(di->supported_devices, NULL, NULL);
+            pa_idxset_free(di->supported_devices, NULL);
         pa_xfree(di);
     }
 
@@ -1552,7 +1552,7 @@ void pa_alsa_ucm_mapping_context_free(pa_alsa_ucm_mapping_context *context) {
                 dev->capture_mapping = NULL;
         }
 
-        pa_idxset_free(context->ucm_devices, NULL, NULL);
+        pa_idxset_free(context->ucm_devices, NULL);
     }
 
     if (context->ucm_modifiers) {
@@ -1563,7 +1563,7 @@ void pa_alsa_ucm_mapping_context_free(pa_alsa_ucm_mapping_context *context) {
                 mod->capture_mapping = NULL;
         }
 
-        pa_idxset_free(context->ucm_modifiers, NULL, NULL);
+        pa_idxset_free(context->ucm_modifiers, NULL);
     }
 }
 
index e77f13bf57ff9abcd8012b8f263b11c8e4b0a4ad..7e49d9305af83458dfec036939f31b928836e6bf 100644 (file)
@@ -585,7 +585,6 @@ fail:
 
 void pa__done(pa_module *m) {
     struct userdata *u;
-    struct connection *c;
 
     pa_assert(m);
 
@@ -595,12 +594,8 @@ void pa__done(pa_module *m) {
     if (u->core_iface)
         pa_dbusiface_core_free(u->core_iface);
 
-    if (u->connections) {
-        while ((c = pa_idxset_steal_first(u->connections, NULL)))
-            connection_free(c);
-
-        pa_idxset_free(u->connections, NULL, NULL);
-    }
+    if (u->connections)
+        pa_idxset_free(u->connections, (pa_free_cb_t) connection_free);
 
     /* This must not be called before the connections are freed, because if
      * there are any connections left, they will emit the
index dd38009705d6c161d3c2786948a798ef297b9a8f..7d660f086b99950931ea703119d02bce1a2b3900 100644 (file)
@@ -550,6 +550,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
     pa_assert_se(o = i->userdata);
 
     pa_module_unload_request(o->userdata->module, TRUE);
+    pa_idxset_remove_by_data(o->userdata->outputs, o, NULL);
     output_free(o);
 }
 
@@ -1107,6 +1108,7 @@ static pa_hook_result_t sink_unlink_hook_cb(pa_core *c, pa_sink *s, struct userd
     if (!u->automatic)
         u->unlinked_slaves = pa_strlist_prepend(u->unlinked_slaves, s->name);
 
+    pa_idxset_remove_by_data(u->outputs, o, NULL);
     output_free(o);
 
     return PA_HOOK_OK;
@@ -1368,7 +1370,6 @@ fail:
 
 void pa__done(pa_module*m) {
     struct userdata *u;
-    struct output *o;
 
     pa_assert(m);
 
@@ -1386,12 +1387,8 @@ void pa__done(pa_module*m) {
     if (u->sink_state_changed_slot)
         pa_hook_slot_free(u->sink_state_changed_slot);
 
-    if (u->outputs) {
-        while ((o = pa_idxset_first(u->outputs, NULL)))
-            output_free(o);
-
-        pa_idxset_free(u->outputs, NULL, NULL);
-    }
+    if (u->outputs)
+        pa_idxset_free(u->outputs, (pa_free_cb_t) output_free);
 
     if (u->sink)
         pa_sink_unlink(u->sink);
index 1207824aad16247ac8a67478b3ff0b773569e4db..207870d8f338d8543e82c6e12761bb877a8f177a 100644 (file)
@@ -1699,7 +1699,7 @@ void pa__done(pa_module*m) {
     }
 
     if (u->subscribed)
-        pa_idxset_free(u->subscribed, NULL, NULL);
+        pa_idxset_free(u->subscribed, NULL);
 
     pa_xfree(u);
 }
index 2a666ac4e2e0ba9a61ee496574ddf56127cb1cf2..8360a05a415a8efd0d84002c920d6dabb1388ee5 100644 (file)
@@ -351,7 +351,7 @@ static struct perportentry* perportentry_new(pa_bool_t add_pcm_format) {
 static void perportentry_free(struct perportentry* e) {
     pa_assert(e);
 
-    pa_idxset_free(e->formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+    pa_idxset_free(e->formats, (pa_free_cb_t) pa_format_info_free);
     pa_xfree(e);
 }
 
@@ -1151,7 +1151,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
                 e = perportentry_new(FALSE);
             else {
                 /* Clean out any saved formats */
-                pa_idxset_free(e->formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+                pa_idxset_free(e->formats, (pa_free_cb_t) pa_format_info_free);
                 e->formats = pa_idxset_new(NULL, NULL);
             }
 
@@ -1338,7 +1338,7 @@ void pa__done(pa_module*m) {
     }
 
     if (u->subscribed)
-        pa_idxset_free(u->subscribed, NULL, NULL);
+        pa_idxset_free(u->subscribed, NULL);
 
     pa_xfree(u);
 }
index 77bac1e4b241ff97b172dc1dddd2775946f63372..6e6ea725eb60d75e910534219a59e93086e0f91f 100644 (file)
@@ -283,23 +283,17 @@ fail:
 
 void pa__done(pa_module *m) {
     struct userdata* u;
-    char *role;
 
     pa_assert(m);
 
     if (!(u = m->userdata))
         return;
 
-    if (u->trigger_roles) {
-        while ((role = pa_idxset_steal_first(u->trigger_roles, NULL)))
-            pa_xfree(role);
-        pa_idxset_free(u->trigger_roles, NULL, NULL);
-    }
-    if (u->cork_roles) {
-        while ((role = pa_idxset_steal_first(u->cork_roles, NULL)))
-            pa_xfree(role);
-        pa_idxset_free(u->cork_roles, NULL, NULL);
-    }
+    if (u->trigger_roles)
+        pa_idxset_free(u->trigger_roles, pa_xfree);
+
+    if (u->cork_roles)
+        pa_idxset_free(u->cork_roles, pa_xfree);
 
     if (u->sink_input_put_slot)
         pa_hook_slot_free(u->sink_input_put_slot);
index 8ea43ade751acb34d8e6372d31abc9c7d9c1515f..99478714bc40a76d5ab876f750e29b0e46df8348 100644 (file)
@@ -286,28 +286,23 @@ fail:
 void pa__done(pa_module *m) {
     struct userdata* u;
     pa_sink_input *i;
-    char *role;
 
     pa_assert(m);
 
     if (!(u = m->userdata))
         return;
 
-    if (u->trigger_roles) {
-        while ((role = pa_idxset_steal_first(u->trigger_roles, NULL)))
-            pa_xfree(role);
-        pa_idxset_free(u->trigger_roles, NULL, NULL);
-    }
-    if (u->ducking_roles) {
-        while ((role = pa_idxset_steal_first(u->ducking_roles, NULL)))
-            pa_xfree(role);
-        pa_idxset_free(u->ducking_roles, NULL, NULL);
-    }
+    if (u->trigger_roles)
+        pa_idxset_free(u->trigger_roles, pa_xfree);
+
+    if (u->ducking_roles)
+        pa_idxset_free(u->ducking_roles, pa_xfree);
+
     if (u->ducked_inputs) {
         while ((i = pa_idxset_steal_first(u->ducked_inputs, NULL)))
             pa_sink_input_remove_volume_factor(i, u->name);
 
-        pa_idxset_free(u->ducked_inputs, NULL, NULL);
+        pa_idxset_free(u->ducked_inputs, NULL);
     }
 
     if (u->sink_input_put_slot)
index 64bb241f2ef2faeb7b382df2d3ff9813f1690f4b..23f4780136900a6fdd6bc9526a82d8af1b192bd6 100644 (file)
@@ -2549,7 +2549,7 @@ void pa__done(pa_module*m) {
     }
 
     if (u->subscribed)
-        pa_idxset_free(u->subscribed, NULL, NULL);
+        pa_idxset_free(u->subscribed, NULL);
 
     pa_xfree(u);
 }
index 542d119bb73fc1047e6c30bf2cd283c95c3c8057..b909eea39d90f26a6fd3a2950f501a64e0a45fff 100644 (file)
@@ -100,10 +100,6 @@ void pa_format_info_free(pa_format_info *f) {
     pa_xfree(f);
 }
 
-void pa_format_info_free2(pa_format_info *f, void *userdata) {
-    pa_format_info_free(f);
-}
-
 int pa_format_info_valid(const pa_format_info *f) {
     return (f->encoding >= 0 && f->encoding < PA_ENCODING_MAX && f->plist != NULL);
 }
index 833653df0d6606c281d67d255bdea76960144755..e72e28547baeed5da7ad75546d52145f7978d035 100644 (file)
@@ -305,8 +305,6 @@ void pa_ext_device_manager_command(pa_context *c, uint32_t tag, pa_tagstruct *t)
 void pa_ext_device_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t);
 void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t);
 
-void pa_format_info_free2(pa_format_info *f, void *userdata);
-
 pa_bool_t pa_mainloop_is_our_api(pa_mainloop_api*m);
 
 #endif
index c3bb7eb587729c76752a3beb34b28745ad7ec2f8..c05fc7aea7575996fc559abec248cbf728f07e14 100644 (file)
@@ -233,9 +233,9 @@ void pa_card_free(pa_card *c) {
     pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
 
     pa_assert(pa_idxset_isempty(c->sinks));
-    pa_idxset_free(c->sinks, NULL, NULL);
+    pa_idxset_free(c->sinks, NULL);
     pa_assert(pa_idxset_isempty(c->sources));
-    pa_idxset_free(c->sources, NULL, NULL);
+    pa_idxset_free(c->sources, NULL);
 
     pa_hashmap_free(c->ports, (pa_free_cb_t) pa_device_port_unref);
 
index c956b101676f28f5e97e72f1526b7a5201927ad4..a8fde9fe83aedb5d39dd335d53dbc1bff7b9db01 100644 (file)
@@ -103,9 +103,9 @@ void pa_client_free(pa_client *c) {
     pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
 
     pa_assert(pa_idxset_isempty(c->sink_inputs));
-    pa_idxset_free(c->sink_inputs, NULL, NULL);
+    pa_idxset_free(c->sink_inputs, NULL);
     pa_assert(pa_idxset_isempty(c->source_outputs));
-    pa_idxset_free(c->source_outputs, NULL, NULL);
+    pa_idxset_free(c->source_outputs, NULL);
 
     pa_proplist_free(c->proplist);
     pa_xfree(c->driver);
index 37f3fae89346522c216bf17a5996843e049f77fc..98ad16e044f645281aeed453e74a95ae2add1c34 100644 (file)
@@ -170,28 +170,28 @@ static void core_free(pa_object *o) {
      * we get here */
 
     pa_assert(pa_idxset_isempty(c->scache));
-    pa_idxset_free(c->scache, NULL, NULL);
+    pa_idxset_free(c->scache, NULL);
 
     pa_assert(pa_idxset_isempty(c->modules));
-    pa_idxset_free(c->modules, NULL, NULL);
+    pa_idxset_free(c->modules, NULL);
 
     pa_assert(pa_idxset_isempty(c->clients));
-    pa_idxset_free(c->clients, NULL, NULL);
+    pa_idxset_free(c->clients, NULL);
 
     pa_assert(pa_idxset_isempty(c->cards));
-    pa_idxset_free(c->cards, NULL, NULL);
+    pa_idxset_free(c->cards, NULL);
 
     pa_assert(pa_idxset_isempty(c->sinks));
-    pa_idxset_free(c->sinks, NULL, NULL);
+    pa_idxset_free(c->sinks, NULL);
 
     pa_assert(pa_idxset_isempty(c->sources));
-    pa_idxset_free(c->sources, NULL, NULL);
+    pa_idxset_free(c->sources, NULL);
 
     pa_assert(pa_idxset_isempty(c->source_outputs));
-    pa_idxset_free(c->source_outputs, NULL, NULL);
+    pa_idxset_free(c->source_outputs, NULL);
 
     pa_assert(pa_idxset_isempty(c->sink_inputs));
-    pa_idxset_free(c->sink_inputs, NULL, NULL);
+    pa_idxset_free(c->sink_inputs, NULL);
 
     pa_assert(pa_hashmap_isempty(c->namereg));
     pa_hashmap_free(c->namereg, NULL);
index 2b6af90bb085a563d5a758c71f79318754d74333..fc3ea58c8db6bde7d656043adde883417d115753 100644 (file)
@@ -139,7 +139,7 @@ static void remove_entry(pa_idxset *s, struct idxset_entry *e) {
     s->n_entries--;
 }
 
-void pa_idxset_free(pa_idxset *s, pa_free2_cb_t free_cb, void *userdata) {
+void pa_idxset_free(pa_idxset *s, pa_free_cb_t free_cb) {
     pa_assert(s);
 
     while (s->iterate_list_head) {
@@ -148,7 +148,7 @@ void pa_idxset_free(pa_idxset *s, pa_free2_cb_t free_cb, void *userdata) {
         remove_entry(s, s->iterate_list_head);
 
         if (free_cb)
-            free_cb(data, userdata);
+            free_cb(data);
     }
 
     pa_xfree(s);
index 2d01fb47346fbce6ffaf917b49de4e895b2a962b..0b12ac1b7e05260c5021cdfeb98b16dec0828451 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <inttypes.h>
 
+#include <pulse/def.h>
+
 #include <pulsecore/macro.h>
 
 /* A combination of a set and a dynamic array. Entries are indexable
@@ -35,9 +37,6 @@
 /* A special index value denoting the invalid index. */
 #define PA_IDXSET_INVALID ((uint32_t) -1)
 
-/* Similar to pa_free_cb_t, but takes a userdata argument */
-typedef void (*pa_free2_cb_t)(void *p, void *userdata);
-
 /* Generic implementations for hash and comparison functions. Just
  * compares the pointer or calculates the hash value directly from the
  * pointer value. */
@@ -57,7 +56,7 @@ typedef struct pa_idxset pa_idxset;
 pa_idxset* pa_idxset_new(pa_hash_func_t hash_func, pa_compare_func_t compare_func);
 
 /* Free the idxset. When the idxset is not empty the specified function is called for every entry contained */
-void pa_idxset_free(pa_idxset *s, pa_free2_cb_t free_cb, void *userdata);
+void pa_idxset_free(pa_idxset *s, pa_free_cb_t free_cb);
 
 /* Store a new item in the idxset. The index of the item is returned in *idx */
 int pa_idxset_put(pa_idxset*s, void *p, uint32_t *idx);
index da64874488557f9d95fe0ec9c977521fe2f53f95..cc6eeeefa1eca7ea5407cd309cbf2f1bbec6bf96 100644 (file)
@@ -134,7 +134,7 @@ void pa_cli_protocol_unref(pa_cli_protocol *p) {
     while ((c = pa_idxset_first(p->connections, NULL)))
         cli_unlink(p, c);
 
-    pa_idxset_free(p->connections, NULL, NULL);
+    pa_idxset_free(p->connections, NULL);
 
     pa_assert_se(pa_shared_remove(p->core, "cli-protocol") >= 0);
 
index dab467879cf73a2d1807830caad1c7bde712441a..ffd8ea2035fa226c0eaf5853fdc2e32771acf3b8 100644 (file)
@@ -171,7 +171,7 @@ void pa_dbus_protocol_unref(pa_dbus_protocol *p) {
 
     pa_hashmap_free(p->objects, NULL);
     pa_hashmap_free(p->connections, NULL);
-    pa_idxset_free(p->extensions, NULL, NULL);
+    pa_idxset_free(p->extensions, NULL);
 
     for (i = 0; i < PA_DBUS_PROTOCOL_HOOK_MAX; ++i)
         pa_hook_done(&p->hooks[i]);
@@ -928,22 +928,15 @@ static struct signal_paths_entry *signal_paths_entry_new(const char *signal_name
 }
 
 static void signal_paths_entry_free(struct signal_paths_entry *e) {
-    char *path = NULL;
-
     pa_assert(e);
 
     pa_xfree(e->signal);
-
-    while ((path = pa_idxset_steal_first(e->paths, NULL)))
-        pa_xfree(path);
-
-    pa_idxset_free(e->paths, NULL, NULL);
+    pa_idxset_free(e->paths, pa_xfree);
     pa_xfree(e);
 }
 
 int pa_dbus_protocol_unregister_connection(pa_dbus_protocol *p, DBusConnection *conn) {
     struct connection_entry *conn_entry = NULL;
-    char *object_path = NULL;
 
     pa_assert(p);
     pa_assert(conn);
@@ -954,12 +947,7 @@ int pa_dbus_protocol_unregister_connection(pa_dbus_protocol *p, DBusConnection *
     unregister_all_objects(p, conn);
 
     dbus_connection_unref(conn_entry->connection);
-
-    while ((object_path = pa_idxset_steal_first(conn_entry->all_signals_objects, NULL)))
-        pa_xfree(object_path);
-
-    pa_idxset_free(conn_entry->all_signals_objects, NULL, NULL);
-
+    pa_idxset_free(conn_entry->all_signals_objects, pa_xfree);
     pa_hashmap_free(conn_entry->listening_signals, (pa_free_cb_t) signal_paths_entry_free);
     pa_xfree(conn_entry);
 
index ce500844d8a97cbefd01f5f6ca35051472b976ac..52aa2c507934317998b90af01431e7fd4223985c 100644 (file)
@@ -1627,7 +1627,7 @@ void pa_esound_protocol_unref(pa_esound_protocol *p) {
     while ((c = pa_idxset_first(p->connections, NULL)))
         connection_unlink(c);
 
-    pa_idxset_free(p->connections, NULL, NULL);
+    pa_idxset_free(p->connections, NULL);
 
     pa_assert_se(pa_shared_remove(p->core, "esound-protocol") >= 0);
 
index d7456345821ea596b4469c6439e6353a6f14b1cc..400150fb407158eb706a85c93d768c63b76bc756 100644 (file)
@@ -786,7 +786,7 @@ void pa_http_protocol_unref(pa_http_protocol *p) {
     while ((c = pa_idxset_first(p->connections, NULL)))
         connection_unlink(c);
 
-    pa_idxset_free(p->connections, NULL, NULL);
+    pa_idxset_free(p->connections, NULL);
 
     pa_strlist_free(p->servers);
 
index 6a9379e919ec242a97943375427454c5dc20b823..a4ee920079f7d422ffb56e820f9993d18eed4c2d 100644 (file)
@@ -1222,7 +1222,7 @@ static playback_stream* playback_stream_new(
 
 out:
     if (formats)
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
 
     return s;
 }
@@ -1340,8 +1340,8 @@ static void native_connection_free(pa_object *o) {
 
     native_connection_unlink(c);
 
-    pa_idxset_free(c->record_streams, NULL, NULL);
-    pa_idxset_free(c->output_streams, NULL, NULL);
+    pa_idxset_free(c->record_streams, NULL);
+    pa_idxset_free(c->output_streams, NULL);
 
     pa_pdispatch_unref(c->pdispatch);
     pa_pstream_unref(c->pstream);
@@ -2193,7 +2193,7 @@ finish:
     if (p)
         pa_proplist_free(p);
     if (formats)
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
 }
 
 static void command_delete_stream(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
@@ -2508,7 +2508,7 @@ finish:
     if (p)
         pa_proplist_free(p);
     if (formats)
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
 }
 
 static void command_exit(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
@@ -3143,7 +3143,7 @@ static void sink_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_sin
             pa_tagstruct_put_format_info(t, f);
         }
 
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
     }
 }
 
@@ -3213,7 +3213,7 @@ static void source_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_s
             pa_tagstruct_put_format_info(t, f);
         }
 
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
     }
 }
 
@@ -5093,7 +5093,7 @@ void pa_native_protocol_unref(pa_native_protocol *p) {
     while ((c = pa_idxset_first(p->connections, NULL)))
         native_connection_unlink(c);
 
-    pa_idxset_free(p->connections, NULL, NULL);
+    pa_idxset_free(p->connections, NULL);
 
     pa_strlist_free(p->servers);
 
index 8d8f5b8b8f77059a1bebd6fb3cb2de889df9be18..9242e68d863ff403be20ec85b132cb5886be5423 100644 (file)
@@ -690,7 +690,7 @@ void pa_simple_protocol_unref(pa_simple_protocol *p) {
     while ((c = pa_idxset_first(p->connections, NULL)))
         connection_unlink(c);
 
-    pa_idxset_free(p->connections, NULL, NULL);
+    pa_idxset_free(p->connections, NULL);
 
     pa_assert_se(pa_shared_remove(p->core, "simple-protocol") >= 0);
 
index 165faa7c11655b63302d66656d5a834b1eabaaf9..519f47e36ded967f9f6c9dc4bb747dec7eda6948 100644 (file)
@@ -198,12 +198,12 @@ pa_bool_t pa_sink_input_new_data_set_sink(pa_sink_input_new_data *data, pa_sink
             data->sink = s;
             data->save_sink = save;
             if (data->nego_formats)
-                pa_idxset_free(data->nego_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+                pa_idxset_free(data->nego_formats, (pa_free_cb_t) pa_format_info_free);
             data->nego_formats = formats;
         } else {
             /* Sink doesn't support any of the formats requested by the client */
             if (formats)
-                pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+                pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
             ret = FALSE;
         }
     }
@@ -216,7 +216,7 @@ pa_bool_t pa_sink_input_new_data_set_formats(pa_sink_input_new_data *data, pa_id
     pa_assert(formats);
 
     if (data->req_formats)
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
 
     data->req_formats = formats;
 
@@ -232,10 +232,10 @@ void pa_sink_input_new_data_done(pa_sink_input_new_data *data) {
     pa_assert(data);
 
     if (data->req_formats)
-        pa_idxset_free(data->req_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(data->req_formats, (pa_free_cb_t) pa_format_info_free);
 
     if (data->nego_formats)
-        pa_idxset_free(data->nego_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(data->nego_formats, (pa_free_cb_t) pa_format_info_free);
 
     if (data->format)
         pa_format_info_free(data->format);
@@ -738,7 +738,7 @@ static void sink_input_free(pa_object *o) {
         pa_proplist_free(i->proplist);
 
     if (i->direct_outputs)
-        pa_idxset_free(i->direct_outputs, NULL, NULL);
+        pa_idxset_free(i->direct_outputs, NULL);
 
     if (i->thread_info.direct_outputs)
         pa_hashmap_free(i->thread_info.direct_outputs, NULL);
index d8fb5fea4d40b6667e8aef8b63a1585b082675da..6ebe95637a631ca548615e78dd600ef4c9ab0004 100644 (file)
@@ -730,7 +730,7 @@ static void sink_free(pa_object *o) {
         s->monitor_source = NULL;
     }
 
-    pa_idxset_free(s->inputs, NULL, NULL);
+    pa_idxset_free(s->inputs, NULL);
     pa_hashmap_free(s->thread_info.inputs, (pa_free_cb_t) pa_sink_input_unref);
 
     if (s->silence.memblock)
@@ -3734,7 +3734,7 @@ pa_bool_t pa_sink_check_format(pa_sink *s, pa_format_info *f)
             }
         }
 
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
     }
 
     return ret;
@@ -3764,7 +3764,7 @@ pa_idxset* pa_sink_check_formats(pa_sink *s, pa_idxset *in_formats) {
 
 done:
     if (sink_formats)
-        pa_idxset_free(sink_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(sink_formats, (pa_free_cb_t) pa_format_info_free);
 
     return out_formats;
 }
index 0f1a946800d6926c915ce45bec24c0068e7927ae..d942419de0025ebd208a56e5a5456e2ca05be557 100644 (file)
@@ -143,12 +143,12 @@ pa_bool_t pa_source_output_new_data_set_source(pa_source_output_new_data *data,
             data->source = s;
             data->save_source = save;
             if (data->nego_formats)
-                pa_idxset_free(data->nego_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+                pa_idxset_free(data->nego_formats, (pa_free_cb_t) pa_format_info_free);
             data->nego_formats = formats;
         } else {
             /* Source doesn't support any of the formats requested by the client */
             if (formats)
-                pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+                pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
             ret = FALSE;
         }
     }
@@ -161,7 +161,7 @@ pa_bool_t pa_source_output_new_data_set_formats(pa_source_output_new_data *data,
     pa_assert(formats);
 
     if (data->req_formats)
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
 
     data->req_formats = formats;
 
@@ -177,10 +177,10 @@ void pa_source_output_new_data_done(pa_source_output_new_data *data) {
     pa_assert(data);
 
     if (data->req_formats)
-        pa_idxset_free(data->req_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(data->req_formats, (pa_free_cb_t) pa_format_info_free);
 
     if (data->nego_formats)
-        pa_idxset_free(data->nego_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(data->nego_formats, (pa_free_cb_t) pa_format_info_free);
 
     if (data->format)
         pa_format_info_free(data->format);
index f72d66701bfadf386189ff7ff9d332cce5632678..4e4cd6770f92fbd5fba2462b7c8f40c05a342108 100644 (file)
@@ -659,7 +659,7 @@ static void source_free(pa_object *o) {
 
     pa_log_info("Freeing source %u \"%s\"", s->index, s->name);
 
-    pa_idxset_free(s->outputs, NULL, NULL);
+    pa_idxset_free(s->outputs, NULL);
     pa_hashmap_free(s->thread_info.outputs, (pa_free_cb_t) pa_source_output_unref);
 
     if (s->silence.memblock)
@@ -2801,7 +2801,7 @@ pa_bool_t pa_source_check_format(pa_source *s, pa_format_info *f)
             }
         }
 
-        pa_idxset_free(formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(formats, (pa_free_cb_t) pa_format_info_free);
     }
 
     return ret;
@@ -2831,7 +2831,7 @@ pa_idxset* pa_source_check_formats(pa_source *s, pa_idxset *in_formats) {
 
 done:
     if (source_formats)
-        pa_idxset_free(source_formats, (pa_free2_cb_t) pa_format_info_free2, NULL);
+        pa_idxset_free(source_formats, (pa_free_cb_t) pa_format_info_free);
 
     return out_formats;
 }