diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-11 09:13:54 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-11 09:13:54 +0000 |
commit | b961106236fb569dd7b840e90a47c534bd3b179c (patch) | |
tree | 11600cff710cd883a062d73991cd6d843ec08269 /tcl_class.c | |
parent | 1f1a3b9aa98917d4bc986eacd11cd1fc47946582 (diff) |
add typemap for t_symbol* (but does not work for return values, like in canvas_getdir())
svn path=/trunk/externals/loaders/tclpd/; revision=15722
Diffstat (limited to 'tcl_class.c')
-rw-r--r-- | tcl_class.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tcl_class.c b/tcl_class.c index 596e28d..da8228f 100644 --- a/tcl_class.c +++ b/tcl_class.c @@ -118,12 +118,12 @@ t_tcl* tclpd_new(t_symbol* classsym, int ac, t_atom* at) { av[2] = Tcl_NewStringObj("constructor", -1); Tcl_IncrRefCount(av[2]); for(int i=0; i<ac; i++) { - // NOTE: pd_to_tcl already calls Tcl_IncrRefCount + // NOTE: pdatom_to_tcl already calls Tcl_IncrRefCount // so there is no need to call it here: - if(pd_to_tcl(&at[i], &av[3+i]) == TCL_ERROR) { + if(pdatom_to_tcl(&at[i], &av[3+i]) == TCL_ERROR) { #ifdef DEBUG - post("tclpd_new: failed conversion (pd_to_tcl)"); + post("tclpd_new: failed conversion (pdatom_to_tcl)"); #endif goto error; } @@ -201,9 +201,12 @@ void tclpd_inlet_anything(t_tcl* x, int inlet, t_symbol* s, int ac, t_atom* at) av[4] = Tcl_NewStringObj(s->s_name, -1); Tcl_IncrRefCount(av[4]); for(int i=0; i<ac; i++) { - if(pd_to_tcl(&at[i], &av[5+i]) == TCL_ERROR) { + // NOTE: pdatom_to_tcl already calls Tcl_IncrRefCount + // so there is no need to call it here: + + if(pdatom_to_tcl(&at[i], &av[5+i]) == TCL_ERROR) { #ifdef DEBUG - post("pd_to_tcl: tclpd_inlet_anything: failed during conversion. check memory leaks!"); + post("pdatom_to_tcl: tclpd_inlet_anything: failed during conversion. check memory leaks!"); #endif goto error; } |