mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
25 lines
525 B
C
25 lines
525 B
C
#ifndef __MEM_UTIL__
|
|
#define __MEM_UTIL__
|
|
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
|
|
#include <retro_common_api.h>
|
|
#include <boolean.h>
|
|
|
|
#define FREE(xxxx) if ((xxxx) != NULL) { free((void*)(xxxx)); } (xxxx) = NULL
|
|
|
|
RETRO_BEGIN_DECLS
|
|
|
|
void *malloc_zero(size_t size);
|
|
void free_ptr(void **data_p);
|
|
char *strcpy_alloc(const char *sourceStr);
|
|
char *strcpy_alloc_force(const char *sourceStr);
|
|
void strcat_alloc(char ** destStr_p, const char *appendStr);
|
|
void *memcpy_alloc(const void *src, size_t size);
|
|
|
|
RETRO_END_DECLS
|
|
|
|
#endif
|
|
|