aboutsummaryrefslogtreecommitdiff
path: root/src/fini.c
diff options
context:
space:
mode:
authorJamie Bullock <jamie@postlude.co.uk>2007-10-16 09:37:06 +0000
committerJamie Bullock <jamie@postlude.co.uk>2007-10-16 09:37:06 +0000
commit9ca79a2cc14c18758baa1adfaead49e70d80003e (patch)
treeb49f1ecfc58fee377d1fa223846862d9e98d89e8 /src/fini.c
parent0fbfa15686542864a067b3b03b698a024772eae3 (diff)
downloadLibXtract-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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/fini.c b/src/fini.c
index 3ec9133..185fb62 100644
--- a/src/fini.c
+++ b/src/fini.c
@@ -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
}