Move AOM_CHECK_MEM_ERROR away from the ABI defining aom_codec_internal.h Change-Id: I0c2ae6110142ce6fc6bedf10f1ba3778a8c19c3e
diff --git a/aom/internal/aom_codec_internal.h b/aom/internal/aom_codec_internal.h index 7f9df7a..5aacef7 100644 --- a/aom/internal/aom_codec_internal.h +++ b/aom/internal/aom_codec_internal.h
@@ -43,7 +43,6 @@ */ #ifndef AOM_INTERNAL_AOM_CODEC_INTERNAL_H_ #define AOM_INTERNAL_AOM_CODEC_INTERNAL_H_ -#include "./aom_config.h" #include "../aom_decoder.h" #include "../aom_encoder.h" #include <stdarg.h> @@ -441,25 +440,6 @@ ...) CLANG_ANALYZER_NORETURN; void aom_merge_corrupted_flag(int *corrupted, int value); - -#if CONFIG_DEBUG -#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \ - do { \ - lval = (expr); \ - if (!lval) \ - aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \ - "Failed to allocate " #lval " at %s:%d", __FILE__, \ - __LINE__); \ - } while (0) -#else -#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \ - do { \ - lval = (expr); \ - if (!lval) \ - aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \ - "Failed to allocate " #lval); \ - } while (0) -#endif #ifdef __cplusplus } // extern "C" #endif
diff --git a/aom_mem/aom_mem.h b/aom_mem/aom_mem.h index 75bd4be..0d533c8 100644 --- a/aom_mem/aom_mem.h +++ b/aom_mem/aom_mem.h
@@ -39,6 +39,25 @@ #include AOM_MEM_PLTFRM #endif +#if CONFIG_DEBUG +#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \ + do { \ + lval = (expr); \ + if (!lval) \ + aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \ + "Failed to allocate " #lval " at %s:%d", __FILE__, \ + __LINE__); \ + } while (0) +#else +#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \ + do { \ + lval = (expr); \ + if (!lval) \ + aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \ + "Failed to allocate " #lval); \ + } while (0) +#endif + #if defined(__cplusplus) } #endif