contrib/python-zstandard/zstd/common/zstd_common.c
changeset 30822 b54a2984cdd4
parent 30434 2e484bdea8c4
child 30895 c32454d69b85
equal deleted inserted replaced
30821:7005c03f7387 30822:b54a2984cdd4
    14 ***************************************/
    14 ***************************************/
    15 #include <stdlib.h>         /* malloc */
    15 #include <stdlib.h>         /* malloc */
    16 #include "error_private.h"
    16 #include "error_private.h"
    17 #define ZSTD_STATIC_LINKING_ONLY
    17 #define ZSTD_STATIC_LINKING_ONLY
    18 #include "zstd.h"           /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */
    18 #include "zstd.h"           /* declaration of ZSTD_isError, ZSTD_getErrorName, ZSTD_getErrorCode, ZSTD_getErrorString, ZSTD_versionNumber */
    19 #include "zbuff.h"          /* declaration of ZBUFF_isError, ZBUFF_getErrorName */
       
    20 
    19 
    21 
    20 
    22 /*-****************************************
    21 /*-****************************************
    23 *  Version
    22 *  Version
    24 ******************************************/
    23 ******************************************/
    42 
    41 
    43 /*! ZSTD_getErrorString() :
    42 /*! ZSTD_getErrorString() :
    44 *   provides error code string from enum */
    43 *   provides error code string from enum */
    45 const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorName(code); }
    44 const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorName(code); }
    46 
    45 
    47 
    46 /* ---   ZBUFF Error Management  (deprecated)   --- */
    48 /* **************************************************************
       
    49 *  ZBUFF Error Management
       
    50 ****************************************************************/
       
    51 unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); }
    47 unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); }
    52 
       
    53 const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); }
    48 const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); }
    54 
       
    55 
    49 
    56 
    50 
    57 /*=**************************************************************
    51 /*=**************************************************************
    58 *  Custom allocator
    52 *  Custom allocator
    59 ****************************************************************/
    53 ****************************************************************/