Project Alice
Loading...
Searching...
No Matches
zstd_common.c
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under both the BSD-style license (found in the
6 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 * in the COPYING file in the root directory of this source tree).
8 * You may select, at your option, one of the above-listed licenses.
9 */
10
11
12
13/*-*************************************
14* Dependencies
15***************************************/
16#define ZSTD_DEPS_NEED_MALLOC
17#include "error_private.h"
18#include "zstd_internal.h"
19
20
21/*-****************************************
22* Version
23******************************************/
24unsigned ZSTD_versionNumber(void) { return ZSTD_VERSION_NUMBER; }
25
26const char* ZSTD_versionString(void) { return ZSTD_VERSION_STRING; }
27
28
29/*-****************************************
30* ZSTD Error Management
31******************************************/
32#undef ZSTD_isError /* defined within zstd_internal.h */
36unsigned ZSTD_isError(size_t code) { return ERR_isError(code); }
37
40const char* ZSTD_getErrorName(size_t code) { return ERR_getErrorName(code); }
41
45
48const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorString(code); }
const char * ERR_getErrorString(ERR_enum code)
Definition: error_private.c:15
ERR_STATIC ERR_enum ERR_getErrorCode(size_t code)
Definition: error_private.h:60
ERR_STATIC unsigned ERR_isError(size_t code)
Definition: error_private.h:58
ERR_STATIC const char * ERR_getErrorName(size_t code)
Definition: error_private.h:78
#define ZSTD_VERSION_NUMBER
Definition: zstd.h:110
#define ZSTD_VERSION_STRING
Definition: zstd.h:119
ZSTD_ErrorCode ZSTD_getErrorCode(size_t code)
Definition: zstd_common.c:44
const char * ZSTD_versionString(void)
Definition: zstd_common.c:26
unsigned ZSTD_versionNumber(void)
Definition: zstd_common.c:24
const char * ZSTD_getErrorString(ZSTD_ErrorCode code)
Definition: zstd_common.c:48
const char * ZSTD_getErrorName(size_t code)
Definition: zstd_common.c:40
ZSTD_ErrorCode
Definition: zstd_errors.h:64
#define ZSTD_isError
Definition: zstd_internal.h:48