From 7730f4821d2bf6f5c4723116ff629f8a19514cf5 Mon Sep 17 00:00:00 2001 From: Vesa Date: Fri, 4 Apr 2014 01:19:44 +0300 Subject: [PATCH] Fix close on crash patch which was posted on the mailing list by Filipe Coelho --- plugins/LadspaEffect/caps/interface.cc | 4 ++-- plugins/LadspaEffect/tap/tap_autopan.c | 8 ++++---- plugins/LadspaEffect/tap/tap_chorusflanger.c | 8 ++++---- plugins/LadspaEffect/tap/tap_deesser.c | 8 ++++---- plugins/LadspaEffect/tap/tap_doubler.c | 8 ++++---- plugins/LadspaEffect/tap/tap_dynamics_m.c | 8 ++++---- plugins/LadspaEffect/tap/tap_dynamics_st.c | 8 ++++---- plugins/LadspaEffect/tap/tap_echo.c | 8 ++++---- plugins/LadspaEffect/tap/tap_eq.c | 4 ++-- plugins/LadspaEffect/tap/tap_eqbw.c | 4 ++-- plugins/LadspaEffect/tap/tap_limiter.c | 8 ++++---- plugins/LadspaEffect/tap/tap_pinknoise.c | 8 ++++---- plugins/LadspaEffect/tap/tap_pitch.c | 8 ++++---- plugins/LadspaEffect/tap/tap_reflector.c | 8 ++++---- plugins/LadspaEffect/tap/tap_reverb.c | 8 ++++---- plugins/LadspaEffect/tap/tap_rotspeak.c | 8 ++++---- plugins/LadspaEffect/tap/tap_sigmoid.c | 8 ++++---- plugins/LadspaEffect/tap/tap_tremolo.c | 8 ++++---- plugins/LadspaEffect/tap/tap_tubewarmth.c | 8 ++++---- plugins/LadspaEffect/tap/tap_vibrato.c | 8 ++++---- 20 files changed, 74 insertions(+), 74 deletions(-) diff --git a/plugins/LadspaEffect/caps/interface.cc b/plugins/LadspaEffect/caps/interface.cc index d0289d934..96e3d9806 100644 --- a/plugins/LadspaEffect/caps/interface.cc +++ b/plugins/LadspaEffect/caps/interface.cc @@ -70,7 +70,7 @@ seed() extern "C" { __attribute__ ((constructor)) -void _init() +void caps_so_init() { DescriptorStub ** d = descriptors; @@ -126,7 +126,7 @@ void _init() } __attribute__ ((destructor)) -void _fini() +void caps_so_fini() { for (ulong i = 0; i < N; ++i) delete descriptors[i]; diff --git a/plugins/LadspaEffect/tap/tap_autopan.c b/plugins/LadspaEffect/tap/tap_autopan.c index 1eda204b0..387ae2b92 100644 --- a/plugins/LadspaEffect/tap/tap_autopan.c +++ b/plugins/LadspaEffect/tap/tap_autopan.c @@ -233,10 +233,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { +_init() { int i; char ** port_names; @@ -341,9 +341,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { +_fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_chorusflanger.c b/plugins/LadspaEffect/tap/tap_chorusflanger.c index 24301e242..c85b39439 100644 --- a/plugins/LadspaEffect/tap/tap_chorusflanger.c +++ b/plugins/LadspaEffect/tap/tap_chorusflanger.c @@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -575,9 +575,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(stereo_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_deesser.c b/plugins/LadspaEffect/tap/tap_deesser.c index 583290e5c..b18f33b45 100644 --- a/plugins/LadspaEffect/tap/tap_deesser.c +++ b/plugins/LadspaEffect/tap/tap_deesser.c @@ -349,10 +349,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { int i; char ** port_names; @@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_doubler.c b/plugins/LadspaEffect/tap/tap_doubler.c index ae64ac8c6..b84c1d583 100644 --- a/plugins/LadspaEffect/tap/tap_doubler.c +++ b/plugins/LadspaEffect/tap/tap_doubler.c @@ -574,10 +574,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -717,9 +717,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(stereo_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_dynamics_m.c b/plugins/LadspaEffect/tap/tap_dynamics_m.c index a3d83555f..6ea8d6263 100644 --- a/plugins/LadspaEffect/tap/tap_dynamics_m.c +++ b/plugins/LadspaEffect/tap/tap_dynamics_m.c @@ -516,10 +516,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -646,9 +646,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_dynamics_st.c b/plugins/LadspaEffect/tap/tap_dynamics_st.c index bab3b8b16..7a42fe1e8 100644 --- a/plugins/LadspaEffect/tap/tap_dynamics_st.c +++ b/plugins/LadspaEffect/tap/tap_dynamics_st.c @@ -696,10 +696,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -857,9 +857,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(stereo_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_echo.c b/plugins/LadspaEffect/tap/tap_echo.c index c1aed7ff8..e84cc2b51 100644 --- a/plugins/LadspaEffect/tap/tap_echo.c +++ b/plugins/LadspaEffect/tap/tap_echo.c @@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -607,9 +607,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(stereo_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_eq.c b/plugins/LadspaEffect/tap/tap_eq.c index 90c5dd7ab..2c07cd004 100644 --- a/plugins/LadspaEffect/tap/tap_eq.c +++ b/plugins/LadspaEffect/tap/tap_eq.c @@ -494,7 +494,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) { void -__attribute__((constructor)) _init() { + _init() { char **port_names; LADSPA_PortDescriptor *port_descriptors; @@ -765,7 +765,7 @@ __attribute__((constructor)) _init() { void -__attribute__((destructor)) _fini() { + _fini() { if (eqDescriptor) { free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors); diff --git a/plugins/LadspaEffect/tap/tap_eqbw.c b/plugins/LadspaEffect/tap/tap_eqbw.c index 8135b1c93..3805d003a 100644 --- a/plugins/LadspaEffect/tap/tap_eqbw.c +++ b/plugins/LadspaEffect/tap/tap_eqbw.c @@ -596,7 +596,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) { void -__attribute__((constructor)) _init() { + _init() { char **port_names; LADSPA_PortDescriptor *port_descriptors; @@ -955,7 +955,7 @@ __attribute__((constructor)) _init() { void -__attribute__((destructor)) _fini() { + _fini() { if (eqDescriptor) { free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors); diff --git a/plugins/LadspaEffect/tap/tap_limiter.c b/plugins/LadspaEffect/tap/tap_limiter.c index 346d3c6ce..7cd829c7c 100644 --- a/plugins/LadspaEffect/tap/tap_limiter.c +++ b/plugins/LadspaEffect/tap/tap_limiter.c @@ -324,10 +324,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -423,9 +423,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_pinknoise.c b/plugins/LadspaEffect/tap/tap_pinknoise.c index 4a55628e4..5984ecee4 100644 --- a/plugins/LadspaEffect/tap/tap_pinknoise.c +++ b/plugins/LadspaEffect/tap/tap_pinknoise.c @@ -225,10 +225,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -325,9 +325,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_pitch.c b/plugins/LadspaEffect/tap/tap_pitch.c index d0f39d390..eec650682 100644 --- a/plugins/LadspaEffect/tap/tap_pitch.c +++ b/plugins/LadspaEffect/tap/tap_pitch.c @@ -418,10 +418,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { int i; char ** port_names; @@ -536,9 +536,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_reflector.c b/plugins/LadspaEffect/tap/tap_reflector.c index 9c1826f42..4e8e33aa6 100644 --- a/plugins/LadspaEffect/tap/tap_reflector.c +++ b/plugins/LadspaEffect/tap/tap_reflector.c @@ -378,10 +378,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { int i; char ** port_names; @@ -480,9 +480,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_reverb.c b/plugins/LadspaEffect/tap/tap_reverb.c index c42c7ae8c..87afa28da 100644 --- a/plugins/LadspaEffect/tap/tap_reverb.c +++ b/plugins/LadspaEffect/tap/tap_reverb.c @@ -665,10 +665,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -815,9 +815,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(stereo_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_rotspeak.c b/plugins/LadspaEffect/tap/tap_rotspeak.c index 7ec435bd0..c16393c3f 100644 --- a/plugins/LadspaEffect/tap/tap_rotspeak.c +++ b/plugins/LadspaEffect/tap/tap_rotspeak.c @@ -624,10 +624,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { int i; char ** port_names; @@ -748,9 +748,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(stereo_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_sigmoid.c b/plugins/LadspaEffect/tap/tap_sigmoid.c index 83c28cdd6..b1d33e843 100644 --- a/plugins/LadspaEffect/tap/tap_sigmoid.c +++ b/plugins/LadspaEffect/tap/tap_sigmoid.c @@ -228,10 +228,10 @@ cleanup_Sigmoid(LADSPA_Handle Instance) { LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -318,9 +318,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_tremolo.c b/plugins/LadspaEffect/tap/tap_tremolo.c index 820d35b91..a4a929574 100644 --- a/plugins/LadspaEffect/tap/tap_tremolo.c +++ b/plugins/LadspaEffect/tap/tap_tremolo.c @@ -220,10 +220,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -323,9 +323,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_tubewarmth.c b/plugins/LadspaEffect/tap/tap_tubewarmth.c index 4c66fd17c..42a0db495 100644 --- a/plugins/LadspaEffect/tap/tap_tubewarmth.c +++ b/plugins/LadspaEffect/tap/tap_tubewarmth.c @@ -381,10 +381,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { + _init() { char ** port_names; LADSPA_PortDescriptor * port_descriptors; @@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { + _fini() { delete_descriptor(mono_descriptor); } diff --git a/plugins/LadspaEffect/tap/tap_vibrato.c b/plugins/LadspaEffect/tap/tap_vibrato.c index b7780b46a..40d14541e 100644 --- a/plugins/LadspaEffect/tap/tap_vibrato.c +++ b/plugins/LadspaEffect/tap/tap_vibrato.c @@ -308,10 +308,10 @@ LADSPA_Descriptor * mono_descriptor = NULL; -/* __attribute__((constructor)) _init() is called automatically when the plugin library is first +/* _init() is called automatically when the plugin library is first loaded. */ void -__attribute__((constructor)) _init() { +_init() { int i; char ** port_names; @@ -425,9 +425,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) { } -/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */ +/* _fini() is called automatically when the library is unloaded. */ void -__attribute__((destructor)) _fini() { +_fini() { delete_descriptor(mono_descriptor); }