diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-15 14:17:58 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-15 14:17:58 +0000 |
commit | 519a19844437310ecce7a9295df7f1bcfe534282 (patch) | |
tree | 38a76905321ae0c28f236c684f0718676b05dba9 /tclpd.i | |
parent | a5595a6447547e62b58ccf74edafee4fbb21602d (diff) |
fixed binbuf support
svn path=/trunk/externals/loaders/tclpd/; revision=15751
Diffstat (limited to 'tclpd.i')
-rw-r--r-- | tclpd.i | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -11,11 +11,11 @@ %include carrays.i %include typemaps.i -%pointer_functions(t_atom, atom) -%pointer_functions(t_symbol, symbol) +%pointer_functions(t_atom, atom); +%pointer_functions(t_symbol, symbol); -%array_functions(t_atom, atom_array) /* +%array_functions(t_atom_array, atom_array); Creates four functions. type *new_name(int nelements) @@ -81,26 +81,29 @@ void name_setitem(type *ary, int index, type value) %typemap(in) t_tcl * { const char *str = Tcl_GetStringFromObj($input, NULL); $1 = object_table_get(str); - SWIG_contract_assert($1, "not a t_tcl * instance"); + SWIG_contract_assert($1, "not a t_tcl * instance") {}; } %typemap(in) t_pd * { const char *str = Tcl_GetStringFromObj($input, NULL); $1 = object_table_get(str); - SWIG_contract_assert($1, "not a t_pd * instance"); + SWIG_contract_assert($1, "not a t_pd * instance") {}; } %typemap(in) t_text * { - const char *str = Tcl_GetStringFromObj($input, NULL); - t_tcl *x = object_table_get(str); - SWIG_contract_assert(x, "not a t_text * instance"); - $1 = &x->o; + int res = SWIG_ConvertPtr($input, &$1, SWIGTYPE_p__text, 0 | 0 ); + if(!SWIG_IsOK(res)) { + const char *str = Tcl_GetStringFromObj($input, NULL); + t_tcl *x = object_table_get(str); + SWIG_contract_assert(x, "not a t_text * instance") {}; + $1 = &x->o; + } } %typemap(in) t_object * { const char *str = Tcl_GetStringFromObj($input, NULL); t_tcl *x = object_table_get(str); - SWIG_contract_assert(x, "not a t_object * instance"); + SWIG_contract_assert(x, "not a t_object * instance") {}; $1 = &x->o; } |