diff options
author | Gregory Maxwell <greg@xiph.org> | 2013-10-17 15:56:52 -0700 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2013-10-28 10:18:54 -0700 |
commit | 7830cf1bd2c71bad9aa296254cf5c5f9842e8b8e (patch) | |
tree | 53f28e34554bee867a239849b96283bec549a607 /tests | |
parent | 2891d852a38b3acb1810fad9f26ba7e0b181cfb2 (diff) | |
download | libopus-7830cf1bd2c71bad9aa296254cf5c5f9842e8b8e.tar.gz |
Replace "inline" with OPUS_INLINE.
Newer versions of MSVC are unhappy with the strategy of the build
environment redefining "inline" (even though they don't support the
actual keyword). Instead we define OPUS_INLINE to the right thing
in opus_defines.h.
This is the same approach we use for restrict.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_opus_common.h | 8 | ||||
-rw-r--r-- | tests/test_opus_encode.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_opus_common.h b/tests/test_opus_common.h index d1e6b452..66b96900 100644 --- a/tests/test_opus_common.h +++ b/tests/test_opus_common.h @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -static inline void deb2_impl(unsigned char *_t,unsigned char **_p,int _k,int _x,int _y) +static OPUS_INLINE void deb2_impl(unsigned char *_t,unsigned char **_p,int _k,int _x,int _y) { int i; if(_x>2){ @@ -41,7 +41,7 @@ static inline void deb2_impl(unsigned char *_t,unsigned char **_p,int _k,int _x, } /*Generates a De Bruijn sequence (k,2) with length k^2*/ -static inline void debruijn2(int _k, unsigned char *_res) +static OPUS_INLINE void debruijn2(int _k, unsigned char *_res) { unsigned char *p; unsigned char *t; @@ -54,7 +54,7 @@ static inline void debruijn2(int _k, unsigned char *_res) /*MWC RNG of George Marsaglia*/ static opus_uint32 Rz, Rw; -static inline opus_uint32 fast_rand(void) +static OPUS_INLINE opus_uint32 fast_rand(void) { Rz=36969*(Rz&65535)+(Rz>>16); Rw=18000*(Rw&65535)+(Rw>>16); @@ -65,7 +65,7 @@ static opus_uint32 iseed; #ifdef __GNUC__ __attribute__((noreturn)) #endif -static inline void _test_failed(const char *file, int line) +static OPUS_INLINE void _test_failed(const char *file, int line) { fprintf(stderr,"\n ***************************************************\n"); fprintf(stderr," *** A fatal error was detected. ***\n"); diff --git a/tests/test_opus_encode.c b/tests/test_opus_encode.c index 29c47d99..e9cda80f 100644 --- a/tests/test_opus_encode.c +++ b/tests/test_opus_encode.c @@ -93,7 +93,7 @@ static void int_to_char(opus_uint32 i, unsigned char ch[4]) ch[3] = i&0xFF; } -static inline void save_packet(unsigned char* p, int len, opus_uint32 rng) +static OPUS_INLINE void save_packet(unsigned char* p, int len, opus_uint32 rng) { FILE *fout; unsigned char int_field[4]; |