diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2007-10-16 09:37:06 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2007-10-16 09:37:06 +0000 |
commit | 9ca79a2cc14c18758baa1adfaead49e70d80003e (patch) | |
tree | b49f1ecfc58fee377d1fa223846862d9e98d89e8 /src/fini.c | |
parent | 0fbfa15686542864a067b3b03b698a024772eae3 (diff) | |
download | LibXtract-9ca79a2cc14c18758baa1adfaead49e70d80003e.tar.gz LibXtract-9ca79a2cc14c18758baa1adfaead49e70d80003e.tar.bz2 LibXtract-9ca79a2cc14c18758baa1adfaead49e70d80003e.zip |
Fix for 'multiple symbol definitions' vs 'symbol not defined' dilemna. I think the solution is to wrap the globals in a struct, declare it in a header, and wrap with a definition guard, then define _once_ at library init time. (Sounds like a recipe for something...)
Diffstat (limited to 'src/fini.c')
-rw-r--r-- | src/fini.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -32,14 +32,14 @@ void _fini() #endif { #ifdef XTRACT_FFT - if(spectrum_plan != NULL) - fftwf_destroy_plan(spectrum_plan); - if(autocorrelation_fft_plan_1 != NULL) - fftwf_destroy_plan(autocorrelation_fft_plan_1); - if(autocorrelation_fft_plan_2 != NULL) - fftwf_destroy_plan(autocorrelation_fft_plan_2); - if(dct_plan != NULL) - fftwf_destroy_plan(dct_plan); + if(fft_plans.spectrum_plan != NULL) + fftwf_destroy_plan(fft_plans.spectrum_plan); + if(fft_plans.autocorrelation_fft_plan_1 != NULL) + fftwf_destroy_plan(fft_plans.autocorrelation_fft_plan_1); + if(fft_plans.autocorrelation_fft_plan_2 != NULL) + fftwf_destroy_plan(fft_plans.autocorrelation_fft_plan_2); + if(fft_plans.dct_plan != NULL) + fftwf_destroy_plan(fft_plans.dct_plan); fftwf_cleanup(); #endif } |