+2013-01-06 Daiki Ueno <ueno@gnu.org>
+
+ * msgl-fsearch.c (message_fuzzy_index_ty): Don't use float-derived
+ integer SHORT_MSG_MAX to define array.
+ (message_fuzzy_index_alloc): Allocate memory for 'short_messages'
+ field dynamically.
+ (message_fuzzy_index_free): Free it.
+
2013-01-03 Daiki Ueno <ueno@gnu.org>
* xgettext.c (construct_header): Fix memory leak.
character_iterator_t iterator;
hash_table gram4;
size_t firstfew;
- message_list_ty *short_messages[SHORT_MSG_MAX + 1];
+ message_list_ty **short_messages;
};
/* Allocate a fuzzy index corresponding to a given list of messages.
findex->firstfew = 10;
/* Setup lists of short messages. */
+ findex->short_messages = XNMALLOC (SHORT_MSG_MAX + 1, message_list_ty *);
for (l = 0; l <= SHORT_MSG_MAX; l++)
findex->short_messages[l] = message_list_alloc (false);
for (j = 0; j < count; j++)
/* Free the short lists. */
for (l = 0; l <= SHORT_MSG_MAX; l++)
message_list_free (findex->short_messages[l], 1);
+ free (findex->short_messages);
/* Free the index lists occurring as values in the hash tables. */
iter = NULL;