comparison contrib/python-zstandard/zstd/common/mem.h @ 40121:73fef626dae3

zstandard: vendor python-zstandard 0.10.1 This was just released. The upstream source distribution from PyPI was extracted. Unwanted files were removed. The clang-format ignore list was updated to reflect the new source of files. setup.py was updated to pass a new argument to python-zstandard's function for returning an Extension instance. Upstream had to change to use relative paths because Python 3.7's packaging doesn't seem to like absolute paths when defining sources, includes, etc. The default relative path calculation is relative to setup_zstd.py which is different from the directory of Mercurial's setup.py. The project contains a vendored copy of zstandard 1.3.6. The old version was 1.3.4. The API should be backwards compatible and nothing in core should need adjusted. However, there is a new "chunker" API that we may find useful in places where we want to emit compressed chunks of a fixed size. There are a pair of bug fixes in 0.10.0 with regards to compressobj() and decompressobj() when block flushing is used. I actually found these bugs when introducing these APIs in Mercurial! But existing Mercurial code is not affected because we don't perform block flushing. # no-check-commit because 3rd party code has different style guidelines Differential Revision: https://phab.mercurial-scm.org/D4911
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 08 Oct 2018 16:27:40 -0700
parents b1fb341d8a61
children 675775c33ab6
comparison
equal deleted inserted replaced
40120:89742f1fa6cb 40121:73fef626dae3
55 typedef uint32_t U32; 55 typedef uint32_t U32;
56 typedef int32_t S32; 56 typedef int32_t S32;
57 typedef uint64_t U64; 57 typedef uint64_t U64;
58 typedef int64_t S64; 58 typedef int64_t S64;
59 #else 59 #else
60 # include <limits.h>
61 #if CHAR_BIT != 8
62 # error "this implementation requires char to be exactly 8-bit type"
63 #endif
60 typedef unsigned char BYTE; 64 typedef unsigned char BYTE;
65 #if USHRT_MAX != 65535
66 # error "this implementation requires short to be exactly 16-bit type"
67 #endif
61 typedef unsigned short U16; 68 typedef unsigned short U16;
62 typedef signed short S16; 69 typedef signed short S16;
70 #if UINT_MAX != 4294967295
71 # error "this implementation requires int to be exactly 32-bit type"
72 #endif
63 typedef unsigned int U32; 73 typedef unsigned int U32;
64 typedef signed int S32; 74 typedef signed int S32;
75 /* note : there are no limits defined for long long type in C90.
76 * limits exist in C99, however, in such case, <stdint.h> is preferred */
65 typedef unsigned long long U64; 77 typedef unsigned long long U64;
66 typedef signed long long S64; 78 typedef signed long long S64;
67 #endif 79 #endif
68 80
69 81