Skip to content

Commit

Permalink
As cos_cleanup is a no-op now, we might as well remove it.
Browse files Browse the repository at this point in the history
  • Loading branch information
agraef committed Oct 2, 2024
1 parent b9ae87c commit c002630
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pd/src/d_osc.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ static void cos_maketable(void)
#endif
}

static void cos_cleanup(t_class *c)
{
#if 0
// ag: this causes segfaults during regression testing, so we just never
// free the tables at all.
static void cos_cleanup(t_class *c)
{
#ifdef OLDTABSIZE
if (cos_table)
freebytes(cos_table, sizeof(float) * (OLDTABSIZE+1));
Expand All @@ -218,12 +218,12 @@ static void cos_cleanup(t_class *c)
if (cos_newtable)
freebytes(cos_newtable, sizeof(float) * (COSTABLESIZE+1));
cos_newtable = 0;
#endif
}
#endif

static void cos_setup(void)
{
cos_class = class_new(gensym("cos~"), (t_newmethod)cos_new, (t_method)cos_cleanup,
cos_class = class_new(gensym("cos~"), (t_newmethod)cos_new, 0,
sizeof(t_cos), CLASS_MULTICHANNEL, A_DEFFLOAT, 0);
CLASS_MAINSIGNALIN(cos_class, t_cos, x_f);
class_addmethod(cos_class, (t_method)cos_dsp, gensym("dsp"), A_CANT, 0);
Expand Down

0 comments on commit c002630

Please sign in to comment.