Commit 779f31dc authored by Zack Lee's avatar Zack Lee
Browse files

fixed interface inconsistency in [select]

parent 3ad3ffe6
......@@ -361,13 +361,6 @@ static void sel1_proxy_symbol(t_sel1_proxy *x, t_symbol *s)
SETSYMBOL(&p->x_atom, s);
}
static void sel1_proxy_anything(t_sel1_proxy *x, t_symbol *s, int argc,
t_atom *argv)
{
t_sel1 *parent = (t_sel1 *)x->parent;
pd_error(parent, "select: no method for %s", s->s_name);
}
static void sel1_float(t_sel1 *x, t_float f)
{
if (x->x_atom.a_type == A_FLOAT && f == x->x_atom.a_w.w_float)
......@@ -382,11 +375,6 @@ static void sel1_symbol(t_sel1 *x, t_symbol *s)
else outlet_symbol(x->x_outlet2, s);
}
static void sel1_bang(t_sel1 *x)
{
sel1_symbol(x, gensym("bang"));
}
static t_class *sel2_class;
typedef struct _selectelement
......@@ -437,11 +425,6 @@ static void sel2_symbol(t_sel2 *x, t_symbol *s)
outlet_symbol(x->x_rejectout, s);
}
static void sel2_bang(t_sel2 *x)
{
sel2_symbol(x, gensym("bang"));
}
static void sel2_free(t_sel2 *x)
{
freebytes(x->x_vec, x->x_nelement * sizeof(*x->x_vec));
......@@ -505,18 +488,16 @@ void select_setup(void)
0, 0, sizeof(t_sel1_proxy), 0, 0);
class_addfloat(sel1_proxy_class, (t_method)sel1_proxy_float);
class_addsymbol(sel1_proxy_class, (t_method)sel1_proxy_symbol);
class_addanything(sel1_proxy_class, (t_method)sel1_proxy_anything);
sel1_class = class_new(gensym("select"), 0, 0,
sizeof(t_sel1), 0, 0);
class_addfloat(sel1_class, sel1_float);
class_addsymbol(sel1_class, sel1_symbol);
class_addbang(sel1_class, sel1_bang);
sel2_class = class_new(gensym("select"), 0, (t_method)sel2_free,
sizeof(t_sel2), 0, 0);
class_addfloat(sel2_class, sel2_float);
class_addsymbol(sel2_class, sel2_symbol);
class_addbang(sel2_class, sel2_bang);
class_addcreator((t_newmethod)select_new, gensym("select"), A_GIMME, 0);
class_addcreator((t_newmethod)select_new, gensym("sel"), A_GIMME, 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment