ref: d2fb834ebd60efcb3fc5935b668f0d57f0a2a9c5
parent: 107eb6a9d476fd7580a4e319c4bdbdfea63c9347
parent: e8ed030da3f0f529bcd33da988aec41de8fd8dc2
author: James Zern <jzern@google.com>
date: Fri Oct 6 01:30:16 EDT 2017
Merge "vpx_codec.h: namespace local defines"
--- a/vpx/vpx_codec.h
+++ b/vpx/vpx_codec.h
@@ -46,34 +46,35 @@
#include "./vpx_integer.h"
/*!\brief Decorator indicating a function is deprecated */
-#ifndef DEPRECATED
+#ifndef VPX_DEPRECATED
#if defined(__GNUC__) && __GNUC__
-#define DEPRECATED __attribute__((deprecated))
+#define VPX_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
-#define DEPRECATED
+#define VPX_DEPRECATED
#else
-#define DEPRECATED
+#define VPX_DEPRECATED
#endif
-#endif /* DEPRECATED */
+#endif /* VPX_DEPRECATED */
-#ifndef DECLSPEC_DEPRECATED
+#ifndef VPX_DECLSPEC_DEPRECATED
#if defined(__GNUC__) && __GNUC__
-#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */
+#define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
#elif defined(_MSC_VER)
-/*!\brief \copydoc #DEPRECATED */
-#define DECLSPEC_DEPRECATED __declspec(deprecated)
+/*!\brief \copydoc #VPX_DEPRECATED */
+#define VPX_DECLSPEC_DEPRECATED __declspec(deprecated)
#else
-#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */
+#define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
#endif
-#endif /* DECLSPEC_DEPRECATED */
+#endif /* VPX_DECLSPEC_DEPRECATED */
/*!\brief Decorator indicating a function is potentially unused */
-#ifdef UNUSED
-#elif defined(__GNUC__) || defined(__clang__)
-#define UNUSED __attribute__((unused))
+#ifndef VPX_UNUSED
+#if defined(__GNUC__) || defined(__clang__)
+#define VPX_UNUSED __attribute__((unused))
#else
-#define UNUSED
+#define VPX_UNUSED
#endif
+#endif /* VPX_UNUSED */
/*!\brief Current ABI version number
*
@@ -413,7 +414,7 @@
*/
#define VPX_CTRL_USE_TYPE(id, typ) \
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int, typ) \
- UNUSED; \
+ VPX_UNUSED; \
\
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \
int ctrl_id, typ data) { \
@@ -430,13 +431,13 @@
* It defines a static function with the correctly typed arguments as a
* wrapper to the type-unsafe internal function.
*/
-#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
- DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
- vpx_codec_ctx_t *, int, typ) DEPRECATED UNUSED; \
- \
- DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
- vpx_codec_ctx_t *ctx, int ctrl_id, typ data) { \
- return vpx_codec_control_(ctx, ctrl_id, data); \
+#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
+ VPX_DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
+ vpx_codec_ctx_t *, int, typ) VPX_DEPRECATED VPX_UNUSED; \
+ \
+ VPX_DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
+ vpx_codec_ctx_t *ctx, int ctrl_id, typ data) { \
+ return vpx_codec_control_(ctx, ctrl_id, data); \
} /**<\hideinitializer*/
/*!\brief vpx_codec_control void type definition macro
@@ -451,7 +452,7 @@
*/
#define VPX_CTRL_VOID(id) \
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int) \
- UNUSED; \
+ VPX_UNUSED; \
\
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \
int ctrl_id) { \