git ssb

0+

kode54 / syntrax-c



Commit 33459797a80c91fc18cf658c61214bb5e4f739c5

Fix restrict for GCC.

Christopher Snowhill authored on 1/2/2016, 8:26:07 AM
Christopher Snowhill committed on 6/13/2018, 12:10:58 AM
Parent: 04d43dec7d76a8df1f162e2c44da218bc9362210

Files changed

src/syntrax/resampler.cchanged
src/syntrax/resampler.cView
@@ -236,19 +236,19 @@
236236 r->infilled += stereo;
237237 }
238238 }
239239
240-#ifdef _MSC_VER
241-#define RESTRICT __restrict
240+#if defined(_MSC_VER) || defined(__GNUC__)
241+#define restrict __restrict
242242 #endif
243243
244244 static const sample_t * resampler_inner_loop( resampler *r, sample_t** out_,
245245 sample_t const* out_end, sample_t const in [], int in_size )
246246 {
247247 in_size -= write_offset;
248248 if ( in_size > 0 )
249249 {
250- sample_t* RESTRICT out = *out_;
250+ sample_t* restrict out = *out_;
251251 sample_t const* const in_end = in + in_size;
252252 imp_t const* imp = r->imp;
253253
254254 do
@@ -292,9 +292,9 @@
292292 }
293293 return in;
294294 }
295295
296-#undef RESTRICT
296+#undef restrict
297297
298298 static int resampler_wrapper( resampler *r, sample_t out [], int* out_size,
299299 sample_t const in [], int in_size )
300300 {

Built with git-ssb-web