Change size input for allocation functions to size_t type instead of uint32.
This commit is contained in:
parent
903e035a95
commit
e9f97f520a
|
@ -53,7 +53,7 @@ void FCEU_afree(void* ptr)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void *_FCEU_malloc(uint32 size)
|
||||
static void *_FCEU_malloc(size_t size)
|
||||
{
|
||||
void* ret = malloc(size);
|
||||
|
||||
|
@ -68,7 +68,7 @@ static void _FCEU_free(void* ptr)
|
|||
free(ptr);
|
||||
}
|
||||
|
||||
void *FCEU_gmalloc(uint32 size)
|
||||
void *FCEU_gmalloc(size_t size)
|
||||
{
|
||||
void *ret = _FCEU_malloc(size);
|
||||
|
||||
|
@ -78,7 +78,7 @@ void *FCEU_gmalloc(uint32 size)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void *FCEU_malloc(uint32 size)
|
||||
void *FCEU_malloc(size_t size)
|
||||
{
|
||||
void *ret = _FCEU_malloc(size);
|
||||
memset(ret, 0, size);
|
||||
|
@ -95,7 +95,7 @@ void FCEU_free(void *ptr)
|
|||
_FCEU_free(ptr);
|
||||
}
|
||||
|
||||
void *FCEU_dmalloc(uint32 size)
|
||||
void *FCEU_dmalloc(size_t size)
|
||||
{
|
||||
return FCEU_malloc(size);
|
||||
}
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
#define FCEU_dwmemset(d,c,n) {int _x; for(_x=n-4;_x>=0;_x-=4) *(uint32 *)&(d)[_x]=c;}
|
||||
|
||||
//returns a buffer initialized to 0
|
||||
void *FCEU_malloc(uint32 size);
|
||||
void *FCEU_malloc(size_t size);
|
||||
|
||||
//returns a buffer, with jumbled initial contents
|
||||
//used by boards for WRAM etc, initialized to 0 (default) or other via RAMInitOption
|
||||
void *FCEU_gmalloc(uint32 size);
|
||||
void *FCEU_gmalloc(size_t size);
|
||||
|
||||
//free memory allocated with FCEU_gmalloc
|
||||
void FCEU_gfree(void *ptr);
|
||||
|
@ -48,7 +48,7 @@ void FCEU_free(void *ptr);
|
|||
void* FCEU_realloc(void* ptr, size_t size);
|
||||
|
||||
//don't use these. change them if you find them.
|
||||
void *FCEU_dmalloc(uint32 size);
|
||||
void *FCEU_dmalloc(size_t size);
|
||||
|
||||
//don't use these. change them if you find them.
|
||||
void FCEU_dfree(void *ptr);
|
||||
|
|
Loading…
Reference in New Issue