added defaultCustomNULL

This commit is contained in:
inikep
2016-06-03 12:56:56 +02:00
parent c7f008b069
commit db2f540414
7 changed files with 9 additions and 13 deletions
+2 -1
View File
@@ -259,5 +259,6 @@ int ZSTD_isSkipFrame(ZSTD_DCtx* dctx);
void* ZSTD_defaultAllocFunction(void* opaque, size_t size);
void ZSTD_defaultFreeFunction(void* opaque, void* address);
static ZSTD_customMem const defaultCustomMem = { ZSTD_defaultAllocFunction, ZSTD_defaultFreeFunction, NULL };
static ZSTD_customMem const defaultCustomNULL = { NULL, NULL, NULL };
#endif /* ZSTD_CCOMMON_H_MODULE */
+1 -2
View File
@@ -100,8 +100,7 @@ struct ZBUFF_CCtx_s {
ZBUFF_CCtx* ZBUFF_createCCtx(void)
{
ZSTD_customMem const customMem = { NULL, NULL, NULL };
return ZBUFF_createCCtx_advanced(customMem);
return ZBUFF_createCCtx_advanced(defaultCustomNULL);
}
ZBUFF_CCtx* ZBUFF_createCCtx_advanced(ZSTD_customMem customMem)
+1 -2
View File
@@ -122,8 +122,7 @@ struct ZSTD_CCtx_s
ZSTD_CCtx* ZSTD_createCCtx(void)
{
ZSTD_customMem const customMem = { NULL, NULL, NULL };
return ZSTD_createCCtx_advanced(customMem);
return ZSTD_createCCtx_advanced(defaultCustomNULL);
}
ZSTD_CCtx* ZSTD_createCCtx_advanced(ZSTD_customMem customMem)
+1 -2
View File
@@ -88,8 +88,7 @@ struct ZBUFF_DCtx_s {
ZBUFF_DCtx* ZBUFF_createDCtx(void)
{
ZSTD_customMem const customMem = { NULL, NULL, NULL };
return ZBUFF_createDCtx_advanced(customMem);
return ZBUFF_createDCtx_advanced(defaultCustomNULL);
}
ZBUFF_DCtx* ZBUFF_createDCtx_advanced(ZSTD_customMem customMem)
+1 -2
View File
@@ -172,8 +172,7 @@ ZSTD_DCtx* ZSTD_createDCtx_advanced(ZSTD_customMem customMem)
ZSTD_DCtx* ZSTD_createDCtx(void)
{
ZSTD_customMem const customMem = { NULL, NULL, NULL };
return ZSTD_createDCtx_advanced(customMem);
return ZSTD_createDCtx_advanced(defaultCustomNULL);
}