notmuch_message_get_message_id: Fix to cache result
authorCarl Worth <cworth@cworth.org>
Wed, 21 Oct 2009 22:42:54 +0000 (15:42 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 21 Oct 2009 22:42:54 +0000 (15:42 -0700)
commit2afd95bfc2ef2241f7ef80b592c349aac67a28d1
tree6db93e470142aa12a010acb2d8cfac90b87c3e17
parent6c5054ebee5beb72c22d91a57c66b8ecdc65f7bf
notmuch_message_get_message_id: Fix to cache result

Previously, this would allocate new memory with every call. That
was with talloc, of course, so there wasn't any leaking (eventually).
But since we're now calling this internally we want to be a little
less wasteful. It's easy enough to just stash the result into the
message on the first call, and then just return that on subsequent
calls.
message.cc