Added free_msgid to avoid using jfree directly like a function (it

could be a macro).
This commit is contained in:
David Capello 2008-02-10 18:54:35 +00:00
parent fa45321b11
commit db9be355c2

View File

@ -1,5 +1,5 @@
/* ASE - Allegro Sprite Editor
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 David A. Capello
* Copyright (C) 2001-2008 David A. Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -32,6 +32,8 @@
static HashTable *msgids = NULL;
static void free_msgid(void *msgid);
int msgids_load(const char *filename)
{
char buf[4096], leavings[4096];
@ -82,7 +84,7 @@ int msgids_load(const char *filename)
void msgids_clear(void)
{
if (msgids) {
hash_free(msgids, jfree);
hash_free(msgids, free_msgid);
msgids = NULL;
}
}
@ -96,3 +98,8 @@ const char *msgids_get(const char *id)
}
return id;
}
static void free_msgid(void *msgid)
{
jfree(msgid);
}