hashmap: Add the ability to free keys
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Sat, 14 Sep 2013 06:20:10 +0000 (11:50 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 17 Sep 2013 12:31:22 +0000 (18:01 +0530)
commit6825df8cecb050a42804ad861bf67e8e42f634ea
tree00fe32603e74ab562898d9c91fd126bb0b61d9e6
parent317b46b57141f81153e3e7a3966cf9fd1119b0b4
hashmap: Add the ability to free keys

Since the hashmap stores a pointer to the key provided at pa_hashmap_put()
time, it make sense to allow the hashmap to be given ownership of the key and
have it free it at pa_hashmap_remove/free time.

To do this cleanly, we now provide the key and value free functions at hashmap
creation time with a pa_hashmap_new_full. With this, we do away with the free
function that was provided at remove/free time for freeing the value.
41 files changed:
src/modules/alsa/alsa-mixer.c
src/modules/alsa/module-alsa-card.c
src/modules/bluetooth/bluetooth-util.c
src/modules/bluetooth/module-bluetooth-discover.c
src/modules/bluetooth/module-bluetooth-proximity.c
src/modules/dbus/iface-card.c
src/modules/dbus/iface-core.c
src/modules/dbus/iface-device.c
src/modules/gconf/module-gconf.c
src/modules/macosx/module-bonjour-publish.c
src/modules/module-augment-properties.c
src/modules/module-card-restore.c
src/modules/module-console-kit.c
src/modules/module-device-manager.c
src/modules/module-filter-apply.c
src/modules/module-role-cork.c
src/modules/module-stream-restore.c
src/modules/module-suspend-on-idle.c
src/modules/module-systemd-login.c
src/modules/module-udev-detect.c
src/modules/module-zeroconf-discover.c
src/modules/module-zeroconf-publish.c
src/modules/raop/module-raop-discover.c
src/modules/rtp/headerlist.c
src/modules/rtp/module-rtp-recv.c
src/pulse/context.c
src/pulse/proplist.c
src/pulsecore/card.c
src/pulsecore/core.c
src/pulsecore/database-simple.c
src/pulsecore/device-port.c
src/pulsecore/hashmap.c
src/pulsecore/hashmap.h
src/pulsecore/memblock.c
src/pulsecore/modargs.c
src/pulsecore/mutex-win32.c
src/pulsecore/protocol-dbus.c
src/pulsecore/protocol-native.c
src/pulsecore/sink-input.c
src/pulsecore/sink.c
src/pulsecore/source.c