summaryrefslogtreecommitdiff
path: root/src/pulsecore/hashmap.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-14update FSF addresses to FSF web pageOndrej Holecek1-3/+1
FSF addresses used in PA sources are no longer valid and rpmlint generates numerous warnings during packaging because of this. This patch changes all FSF addresses to FSF web page according to the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html Done automatically by sed-ing through sources.
2014-04-17hashmap: Add pa_hashmap_remove_and_free()Tanu Kaskinen1-0/+13
2013-09-17hashmap: Add the ability to free keysArun Raghavan1-8/+21
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.
2013-07-04Remove pa_bool_t and replace it with bool.poljar (Damir Jelić)1-1/+1
commands used for this (executed from the pulseaudio/src directory): find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \ -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \ -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \ -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \ -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \ -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \ -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \ -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \; and: sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \ -e '181,194!s/\bTRUE\b/true/' -e \ '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-02-16hashmap: Add pa_hashmap_remove_all()Tanu Kaskinen1-9/+14
Slightly nicer than using pa_hashmap_steal_first() in a loop.
2013-02-16hashmap: Use pa_free_cb_t instead of pa_free2_cb_tTanu Kaskinen1-2/+2
The previous patch removed module-gconf's dependency on the userdata pointer of the free callback, and that was the only place where the userdata pointer of pa_free2_cb_t was used, so now there's no need for pa_free2_cb_t in pa_hashmap_free(). Using pa_free_cb_t instead allows removing a significant amount of repetitive code.
2011-06-22Remove unnecessary #includesMaarten Bosmans1-2/+0
2009-06-17hashmap: implement pa_hashmap_last()Lennart Poettering1-0/+9
2009-06-17hashmap: implement api to iterate a hashmap backwardsLennart Poettering1-0/+33
2009-03-03Use LGPL 2.1 on all files previously using LGPL 2Colin Guthrie1-1/+1
2009-02-19pulsecore: unused variable e in hashmap_put()Marc-André Lureau1-1/+1
2008-06-27modernize hashmap implementation a bit, reduce memory consumption a bitLennart Poettering1-63/+92
2008-06-18get rid of svn $ keywordsLennart Poettering1-2/+0
2008-05-29allow on-the-fly deleting of hashmap entries wile we iterate through themLennart Poettering1-10/+22
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2491 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-03-31merge r2192 from prepare-0.9.10Lennart Poettering1-4/+4
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2207 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28merge 'lennart' branch back into trunk.Lennart Poettering1-16/+23
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13Add copyright notices to all relevant files. (based on svn log)Pierre Ossman1-0/+2
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04Huge trailing whitespace cleanup. Let's keep the tree pure from here on,Pierre Ossman1-15/+15
mmmkay? git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18cleanup hashmap.[ch] a little: use hash/compare func prototypes defined in ↵Lennart Poettering1-10/+39
idxset.h, add pa_hashmpa_{get,steal}_first git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1263 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-23as a result of memory profiling with valgrind/massif: decrease default hash ↵Lennart Poettering1-1/+1
table size from 1024 to 127. the hashtables are sparsely filled most of the time, so there is no point in allocating to much memory by default. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1140 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19big s/polyp/pulse/gLennart Poettering1-0/+196
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f