mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 22:18:30 +00:00
Added free_msgid to avoid using jfree directly like a function (it
could be a macro).
This commit is contained in:
parent
fa45321b11
commit
db9be355c2
@ -1,5 +1,5 @@
|
|||||||
/* ASE - Allegro Sprite Editor
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
static HashTable *msgids = NULL;
|
static HashTable *msgids = NULL;
|
||||||
|
|
||||||
|
static void free_msgid(void *msgid);
|
||||||
|
|
||||||
int msgids_load(const char *filename)
|
int msgids_load(const char *filename)
|
||||||
{
|
{
|
||||||
char buf[4096], leavings[4096];
|
char buf[4096], leavings[4096];
|
||||||
@ -82,7 +84,7 @@ int msgids_load(const char *filename)
|
|||||||
void msgids_clear(void)
|
void msgids_clear(void)
|
||||||
{
|
{
|
||||||
if (msgids) {
|
if (msgids) {
|
||||||
hash_free(msgids, jfree);
|
hash_free(msgids, free_msgid);
|
||||||
msgids = NULL;
|
msgids = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,3 +98,8 @@ const char *msgids_get(const char *id)
|
|||||||
}
|
}
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void free_msgid(void *msgid)
|
||||||
|
{
|
||||||
|
jfree(msgid);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user