summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorSusu <susu-@live.fr>2013-05-17 11:10:30 +0200
committerSusu <susu-@live.fr>2013-05-17 11:10:30 +0200
commit25e848f1a0f9317d63106cae048a1ef838411cb2 (patch)
tree0c1dc751af9f06e1ce3729d271de301f78a4e611 /src/map/itemdb.c
parent3820bd7e7715bc84f458cf1bf466e6377a2d2e46 (diff)
downloadhercules-25e848f1a0f9317d63106cae048a1ef838411cb2.tar.gz
hercules-25e848f1a0f9317d63106cae048a1ef838411cb2.tar.bz2
hercules-25e848f1a0f9317d63106cae048a1ef838411cb2.tar.xz
hercules-25e848f1a0f9317d63106cae048a1ef838411cb2.zip
- Made DB and malloc lib HPM-friendly
- Also fixed a bug preventing the plugins to be loeaded because HPMI and HPMI_s weren't HPExport
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 590a0cf57..2a5fa48de 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -30,7 +30,7 @@ struct item_data dummy_item; //This is the default dummy item used for non-exist
*/
static int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap)
{
- struct item_data *item = db_data2ptr(data), **dst, **dst2;
+ struct item_data *item = DB->data2ptr(data), **dst, **dst2;
char *str;
str=va_arg(ap,char *);
dst=va_arg(ap,struct item_data **);
@@ -83,7 +83,7 @@ struct item_data* itemdb_searchname(const char *str)
*/
static int itemdb_searchname_array_sub(DBKey key, DBData data, va_list ap)
{
- struct item_data *item = db_data2ptr(&data);
+ struct item_data *item = DB->data2ptr(&data);
char *str;
str=va_arg(ap,char *);
if (item == &dummy_item)
@@ -127,7 +127,7 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str)
size -= count;
db_count = itemdb_other->getall(itemdb_other, (DBData**)&db_data, size, itemdb_searchname_array_sub, str);
for (i = 0; i < db_count; i++)
- data[count++] = db_data2ptr(db_data[i]);
+ data[count++] = DB->data2ptr(db_data[i]);
count += db_count;
}
return count;
@@ -1376,7 +1376,7 @@ static void destroy_item_data(struct item_data* self, int free_self)
*/
static int itemdb_final_sub(DBKey key, DBData *data, va_list ap)
{
- struct item_data *id = db_data2ptr(data);
+ struct item_data *id = DB->data2ptr(data);
if( id != &dummy_item )
destroy_item_data(id, 1);