cache the most recently fetched const pointer so we can hand it out more
authorChris Toshok <toshok@ximian.com>
Tue, 22 Jun 2004 00:52:56 +0000 (00:52 +0000)
committerChris Toshok <toshok@src.gnome.org>
Tue, 22 Jun 2004 00:52:56 +0000 (00:52 +0000)
commit2e462a20a9d945b4449b5920d5eb4f26a94ee3e7
tree6d788c3578d52994d78a20077d2a1b3d8e5a51cb
parent05743e364fd67b17e1048de86922e7f39658813b
cache the most recently fetched const pointer so we can hand it out more

2004-06-21  Chris Toshok  <toshok@ximian.com>

* libebook/e-contact.c (e_contact_get_const): cache the most
recently fetched const pointer so we can hand it out more than
once (unless there's an intervening _set).  Should substantially
lessen the number of allocations we do because of this function.
(e_contact_set): clear the cached slot for this field, so we'll
allocate/return a new const string from e_contact_get_const.
addressbook/ChangeLog
addressbook/libebook/e-contact.c