aboutsummaryrefslogtreecommitdiff
path: root/tclpd.i
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2011-11-15 14:17:58 +0000
committermescalinum <mescalinum@users.sourceforge.net>2011-11-15 14:17:58 +0000
commit519a19844437310ecce7a9295df7f1bcfe534282 (patch)
tree38a76905321ae0c28f236c684f0718676b05dba9 /tclpd.i
parenta5595a6447547e62b58ccf74edafee4fbb21602d (diff)
fixed binbuf support
svn path=/trunk/externals/loaders/tclpd/; revision=15751
Diffstat (limited to 'tclpd.i')
-rw-r--r--tclpd.i23
1 files changed, 13 insertions, 10 deletions
diff --git a/tclpd.i b/tclpd.i
index 8e15d55..442787f 100644
--- a/tclpd.i
+++ b/tclpd.i
@@ -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;
}