From 9ca79a2cc14c18758baa1adfaead49e70d80003e Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Tue, 16 Oct 2007 09:37:06 +0000 Subject: 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...) --- src/fini.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/fini.c') 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 } -- cgit v1.2.3