mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
4e649d000b
The two g_hash_table functions (insert, add) have different behaviour with respect to existing keys. g_hash_table_insert frees the new key, while g_hash_table_add (which is really g_hash_table_replace in disguise) frees the existing key. With this change 'ref' is live until the end of the function (assuming single-threaded access to 'hash'). We can't guarantee it will continue to be live in the future (i.e. there may be a future key duplication) so we copy it with the allocation context passed to parse_references (in practice this is the notmuch_message_t object whose parents we are finding). Thanks to Tomi for the simpler approach to the problem based on reading the fine glib manual. |
||
---|---|---|
.. | ||
built-with.c | ||
config.cc | ||
database-private.h | ||
database.cc | ||
directory.cc | ||
filenames.c | ||
gen-version-script.sh | ||
index.cc | ||
libsha1.c | ||
libsha1.h | ||
Makefile | ||
Makefile.local | ||
message-file.c | ||
message-private.h | ||
message-property.cc | ||
message.cc | ||
messages.c | ||
notmuch-private.h | ||
notmuch.h | ||
parse-time-vrp.cc | ||
parse-time-vrp.h | ||
query-fp.cc | ||
query-fp.h | ||
query.cc | ||
sha1.c | ||
string-list.c | ||
string-map.c | ||
tags.c | ||
thread.cc |