summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 11:09:57 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 11:09:57 +0000
commitbb0488451bdc08e6abe7622d10bbcb4135f2dc8f (patch)
tree9b981f46337325e893178f641dae39399fd6118d /src/common
parentaf99be9bd11d716e0b8ef8eab4a36c9b9925e4c8 (diff)
downloadhercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.tar.gz
hercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.tar.bz2
hercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.tar.xz
hercules-bb0488451bdc08e6abe7622d10bbcb4135f2dc8f.zip
Corrected r12662 where a guild break would trigger the OnGuildBreak event for all castles (even of other guilds).
Corrected some x64 compilation warnings in ers/malloc files. cleaned up a case of bad variable reuse. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12666 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/ers.c2
-rw-r--r--src/common/ers.h4
-rw-r--r--src/common/malloc.c4
-rw-r--r--src/common/malloc.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/common/ers.c b/src/common/ers.c
index ecdda4609..06bad92a4 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -245,7 +245,7 @@ static void ers_obj_free_entry(ERS self, void *entry)
* @see ERS_impl#size
* @see ERS_impl::vtable#entry_size
*/
-static uint32 ers_obj_entry_size(ERS self)
+static size_t ers_obj_entry_size(ERS self)
{
ERS_impl obj = (ERS_impl)self;
diff --git a/src/common/ers.h b/src/common/ers.h
index a9ba50073..47a076e6e 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -103,7 +103,7 @@ typedef struct eri {
* @param self Interface of the entry manager
* @return Size of the entries of this manager in bytes
*/
- uint32 (*entry_size)(struct eri *self);
+ size_t (*entry_size)(struct eri *self);
/**
* Destroy this instance of the manager.
@@ -120,7 +120,7 @@ typedef struct eri {
// Use memory manager to allocate/free and disable other interface functions
# define ers_alloc(obj,type) (type *)aMalloc(sizeof(type))
# define ers_free(obj,entry) aFree(entry)
-# define ers_entry_size(obj) (uint32)0
+# define ers_entry_size(obj) (size_t)0
# define ers_destroy(obj)
// Disable the public functions
# define ers_new(size) NULL
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 93d03107b..c64f757bd 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -509,7 +509,7 @@ static void block_free(struct block* p)
hash_unfill[0] = p;
}
-unsigned int memmgr_usage (void)
+size_t memmgr_usage (void)
{
return memmgr_usage_bytes / 1024;
}
@@ -665,7 +665,7 @@ bool malloc_verify(void* ptr)
#endif
}
-unsigned int malloc_usage (void)
+size_t malloc_usage (void)
{
#ifdef USE_MEMMGR
return memmgr_usage ();
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 609f0a700..aaf3e318d 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -156,7 +156,7 @@
////////////////////////////////////////////////
bool malloc_verify(void* ptr);
-unsigned int malloc_usage (void);
+size_t malloc_usage (void);
void malloc_init (void);
void malloc_final (void);