Updated error API, following suggestions by @nemequ (#116)

This commit is contained in:
Yann Collet
2016-02-03 12:06:24 +01:00
parent ae7aa06650
commit 72bff50ecf
4 changed files with 48 additions and 32 deletions
+5 -5
View File
@@ -39,14 +39,14 @@ extern "C" {
/* ****************************************
* error list
* error codes list
******************************************/
enum {
ZSTD_error_No_Error,
typedef enum {
ZSTD_error_no_error,
ZSTD_error_GENERIC,
ZSTD_error_prefix_unknown,
ZSTD_error_frameParameter_unsupported,
ZSTD_error_frameParameter_unsupportedBy32bitsImplementation,
ZSTD_error_frameParameter_unsupportedBy32bits,
ZSTD_error_init_missing,
ZSTD_error_memory_allocation,
ZSTD_error_stage_wrong,
@@ -58,7 +58,7 @@ enum {
ZSTD_error_maxSymbolValue_tooSmall,
ZSTD_error_dictionary_corrupted,
ZSTD_error_maxCode
};
} ZSTD_errorCode;
/* note : functions provide error codes in reverse negative order,
so compare with (size_t)(0-enum) */