mirror of
				https://github.com/facebook/zstd.git
				synced 2025-10-31 16:47:48 +02:00 
			
		
		
		
	Merge pull request #796 from terrelln/is-error
[FSE][HUF] Inline error checks
This commit is contained in:
		| @@ -42,6 +42,7 @@ | ||||
| #include "compiler.h" | ||||
| #define FSE_STATIC_LINKING_ONLY | ||||
| #include "fse.h" | ||||
| #include "error_private.h" | ||||
|  | ||||
|  | ||||
| /* ************************************************************** | ||||
|   | ||||
| @@ -42,11 +42,13 @@ | ||||
| #include "compiler.h" | ||||
| #define FSE_STATIC_LINKING_ONLY | ||||
| #include "fse.h" | ||||
| #include "error_private.h" | ||||
|  | ||||
|  | ||||
| /* ************************************************************** | ||||
| *  Error Management | ||||
| ****************************************************************/ | ||||
| #define FSE_isError ERR_isError | ||||
| #define FSE_STATIC_ASSERT(c) { enum { FSE_static_assert = 1/(int)(!!(c)) }; }   /* use only *after* variable declarations */ | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -50,11 +50,13 @@ | ||||
| #include "fse.h"        /* header compression */ | ||||
| #define HUF_STATIC_LINKING_ONLY | ||||
| #include "huf.h" | ||||
| #include "error_private.h" | ||||
|  | ||||
|  | ||||
| /* ************************************************************** | ||||
| *  Error Management | ||||
| ****************************************************************/ | ||||
| #define HUF_isError ERR_isError | ||||
| #define HUF_STATIC_ASSERT(c) { enum { HUF_static_assert = 1/(int)(!!(c)) }; }   /* use only *after* variable declarations */ | ||||
| #define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return e | ||||
| #define CHECK_F(f)   { CHECK_V_F(_var_err__, f); } | ||||
|   | ||||
| @@ -41,11 +41,13 @@ | ||||
| #include "fse.h"        /* header compression */ | ||||
| #define HUF_STATIC_LINKING_ONLY | ||||
| #include "huf.h" | ||||
| #include "error_private.h" | ||||
|  | ||||
|  | ||||
| /* ************************************************************** | ||||
| *  Error Management | ||||
| ****************************************************************/ | ||||
| #define HUF_isError ERR_isError | ||||
| #define HUF_STATIC_ASSERT(c) { enum { HUF_static_assert = 1/(int)(!!(c)) }; }   /* use only *after* variable declarations */ | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user