From e7385467c69a8d3ff44a3763f72e89dc0ca7e748 Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@vt.edu> Date: Fri, 7 Nov 2014 23:22:29 -0500 Subject: [PATCH] *fixed lingering bug where static symbols did not project values properly because they did not gensym their own instance. --- pd/src/x_connective.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pd/src/x_connective.c b/pd/src/x_connective.c index 5e7ec6b3d..4576e2db0 100644 --- a/pd/src/x_connective.c +++ b/pd/src/x_connective.c @@ -1037,7 +1037,7 @@ static t_class *trigger_class; typedef struct triggerout { int u_type; /* outlet type from above */ - t_symbol u_sym; /* static value */ + t_symbol *u_sym; /* static value */ t_float u_float; /* static value */ t_outlet *u_outlet; } t_triggerout; @@ -1117,7 +1117,7 @@ static void *trigger_new(t_symbol *s, int argc, t_atom *argv) else if (c == 'S') { //static symbol - u->u_sym = *ap->a_w.w_symbol; + u->u_sym = gensym(ap->a_w.w_symbol->s_name); u->u_type = TR_STATIC_SYMBOL; u->u_outlet = outlet_new(&x->x_obj, &s_symbol); } @@ -1157,7 +1157,7 @@ static void trigger_list(t_trigger *x, t_symbol *s, int argc, t_atom *argv) } else if (u->u_type == TR_STATIC_SYMBOL) { - outlet_symbol(u->u_outlet, &u->u_sym); + outlet_symbol(u->u_outlet, u->u_sym); } else outlet_list(u->u_outlet, &s_list, argc, argv); } @@ -1184,7 +1184,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv) } else if (u->u_type == TR_STATIC_SYMBOL) { - outlet_symbol(u->u_outlet, &u->u_sym); + outlet_symbol(u->u_outlet, u->u_sym); } //else trigger_symbol(x, s); else @@ -1227,7 +1227,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv) else if (u->u_type == TR_STATIC_SYMBOL) { //fprintf(stderr,"trigger_anything -> TR_STATIC_SYMBOL %d\n", argc); - outlet_symbol(u->u_outlet, &u->u_sym); + outlet_symbol(u->u_outlet, u->u_sym); } else { -- GitLab