aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/common.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-06-24 23:25:41 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-06-24 23:25:41 +0300
commit1b4675cebf7471f7cc9b7072c950e3de97147063 (patch)
treeb0cf7b11e0fd86051192427ac3390372fda8d318 /src/liblzma/common/common.h
parentxz: Silence a warning from clang -Wsign-conversion in main.c. (diff)
downloadxz-1b4675cebf7471f7cc9b7072c950e3de97147063.tar.xz
Add LZMA_RET_INTERNAL1..8 to lzma_ret and use one for LZMA_TIMED_OUT.
LZMA_TIMED_OUT is *internally* used as a value for lzma_ret enumeration. Previously it was #defined to 32 and cast to lzma_ret. That way it wasn't visible in the public API, but this was hackish. Now the public API has eight LZMA_RET_INTERNALx members and LZMA_TIMED_OUT is #defined to LZMA_RET_INTERNAL1. This way the code is cleaner overall although the public API has a few extra mysterious enum members.
Diffstat (limited to '')
-rw-r--r--src/liblzma/common/common.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h
index b3d3b7a0..555c77d1 100644
--- a/src/liblzma/common/common.h
+++ b/src/liblzma/common/common.h
@@ -83,9 +83,8 @@
/// Special return value (lzma_ret) to indicate that a timeout was reached
/// and lzma_code() must not return LZMA_BUF_ERROR. This is converted to
-/// LZMA_OK in lzma_code(). This is not in the lzma_ret enumeration because
-/// there's no need to have it in the public API.
-#define LZMA_TIMED_OUT 32
+/// LZMA_OK in lzma_code().
+#define LZMA_TIMED_OUT LZMA_RET_INTERNAL1
typedef struct lzma_next_coder_s lzma_next_coder;