X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=lzma%2Fapi%2Flzma%2Fbase.h;h=a6005accc93d813042af29a5561f95153f4b1854;hb=4eb796015485ad6b24f5df7a5013f7e9f2450b8c;hp=7a31a4205136c868e85ee6f018f6fa84350fffad;hpb=32b8a6b26ed8843828e03e505d2256960bda0980;p=zpackage diff --git a/lzma/api/lzma/base.h b/lzma/api/lzma/base.h index 7a31a42..a6005ac 100644 --- a/lzma/api/lzma/base.h +++ b/lzma/api/lzma/base.h @@ -644,11 +644,16 @@ extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm) * This function is supported only when *strm has been initialized with * a function that takes a memlimit argument. * + * liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes + * this function to do nothing (leaving the limit unchanged) and still + * return LZMA_OK. Later versions treat 0 as if 1 had been specified (so + * lzma_memlimit_get() will return 1 even if you specify 0 here). + * * \return - LZMA_OK: New memory usage limit successfully set. * - LZMA_MEMLIMIT_ERROR: The new limit is too small. * The limit was not changed. * - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't - * support memory usage limit or memlimit was zero. + * support memory usage limit. */ extern LZMA_API(lzma_ret) lzma_memlimit_set( lzma_stream *strm, uint64_t memlimit) lzma_nothrow;