1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

Add typedefs for 8bit (un)signed

To make code more expressive, add U8 and S8 typedefs
This commit is contained in:
Norbert Lange
2021-12-14 22:33:39 +01:00
parent 64205b7832
commit 99923dfc1a
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,8 @@
* Basic Types
*****************************************************************/
typedef uint8_t BYTE;
typedef uint8_t U8;
typedef int8_t S8;
typedef uint16_t U16;
typedef int16_t S16;
typedef uint32_t U32;

View File

@ -51,6 +51,8 @@ extern "C" {
# include <stdint.h> /* intptr_t */
# endif
typedef uint8_t BYTE;
typedef uint8_t U8;
typedef int8_t S8;
typedef uint16_t U16;
typedef int16_t S16;
typedef uint32_t U32;
@ -63,6 +65,8 @@ extern "C" {
# error "this implementation requires char to be exactly 8-bit type"
#endif
typedef unsigned char BYTE;
typedef unsigned char U8;
typedef signed char S8;
#if USHRT_MAX != 65535
# error "this implementation requires short to be exactly 16-bit type"
#endif