Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
deflate_state *s;
int wrap = 1;
-#ifndef DISABLE_RUNTIME_CPU_DETECTION
- /* Force initialization functable, because deflate captures function pointers from functable. */
- functable.force_init();
-#endif
+ /* Initialize functable */
+ FUNCTABLE_INIT;
if (strm == NULL)
return Z_STREAM_ERROR;
* Instead we use native_ macro indicating the best available variant of arch-specific
* functions for the current platform.
*/
+# define FUNCTABLE_INIT ((void)0)
# define FUNCTABLE_CALL(name) native_ ## name
# define FUNCTABLE_FPTR(name) &native_ ## name
/* Explicitly indicate functions are conditionally dispatched.
*/
+# define FUNCTABLE_INIT functable.force_init()
# define FUNCTABLE_CALL(name) functable.name
# define FUNCTABLE_FPTR(name) functable.name
int32_t ret;
struct inflate_state *state;
-#ifndef DISABLE_RUNTIME_CPU_DETECTION
- /* Initialize functable earlier. */
- functable.force_init();
-#endif
+ /* Initialize functable */
+ FUNCTABLE_INIT;
if (strm == NULL)
return Z_STREAM_ERROR;