mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-07-31 07:07:46 +00:00
Support default __stdcall calling convention (/Gz) on Windows
This commit is contained in:
@@ -119,22 +119,22 @@ static int case_insensitive_strcmp(const unsigned char *string1, const unsigned
|
||||
|
||||
typedef struct internal_hooks
|
||||
{
|
||||
void *(*allocate)(size_t size);
|
||||
void (*deallocate)(void *pointer);
|
||||
void *(*reallocate)(void *pointer, size_t size);
|
||||
void *(CJSON_CDECL *allocate)(size_t size);
|
||||
void (CJSON_CDECL *deallocate)(void *pointer);
|
||||
void *(CJSON_CDECL *reallocate)(void *pointer, size_t size);
|
||||
} internal_hooks;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* work around MSVC error C2322: '...' address of dillimport '...' is not static */
|
||||
static void *internal_malloc(size_t size)
|
||||
static void * CJSON_CDECL internal_malloc(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
static void internal_free(void *pointer)
|
||||
static void CJSON_CDECL internal_free(void *pointer)
|
||||
{
|
||||
free(pointer);
|
||||
}
|
||||
static void *internal_realloc(void *pointer, size_t size)
|
||||
static void * CJSON_CDECL internal_realloc(void *pointer, size_t size)
|
||||
{
|
||||
return realloc(pointer, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user