From 2f5abe3d9fdc42d3b2f2d50c1d7621487348ac10 Mon Sep 17 00:00:00 2001 From: mescalinum Date: Tue, 1 Sep 2009 19:53:32 +0000 Subject: pass inlet number around instead of binding it to the selector svn path=/trunk/externals/tclpd/; revision=12169 --- tcl_class.cxx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'tcl_class.cxx') diff --git a/tcl_class.cxx b/tcl_class.cxx index 8b21139..fb7131e 100644 --- a/tcl_class.cxx +++ b/tcl_class.cxx @@ -37,7 +37,7 @@ t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at) { t_tcl* self = (t_tcl*)pd_new(qlass); self->ninlets = 1 /* qlass->c_firstin ??? */; char s[32]; - sprintf(s, "pd%06lx", objectSequentialId++); + sprintf(s, "tclpd:%s:x%x", name, objectSequentialId++); self->self = Tcl_NewStringObj(s, -1); Tcl_IncrRefCount(self->self); object_table[string(s)] = (t_pd*)self; @@ -47,46 +47,44 @@ t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at) { av[1] = self->self; for(int i=0; iself; av[1] = Tcl_NewIntObj(inlet); - Tcl_AppendToObj(av[1],"_",1); - Tcl_AppendToObj(av[1],s->s_name,strlen(s->s_name)); // selector Tcl_IncrRefCount(av[1]); + av[2] = Tcl_NewStringObj(s->s_name, -1); + Tcl_IncrRefCount(av[2]); for(int i=0; i