diff options
Diffstat (limited to 'tclpd.i')
-rw-r--r-- | tclpd.i | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -88,6 +88,7 @@ void name_setitem(type *ary, int index, type value) const char *str = Tcl_GetStringFromObj($input, NULL); $1 = object_table_get(str); SWIG_contract_assert($1, "not a t_pd * instance") {}; + // XXX: %typemap(out) missing!!! } %typemap(in) t_text * { @@ -107,6 +108,13 @@ void name_setitem(type *ary, int index, type value) $1 = &x->o; } +%typemap(in) struct _class * { + const char *str = Tcl_GetStringFromObj($input, NULL); + t_class *c = class_table_get(str); + SWIG_contract_assert(c, "invalid class name") {}; + $1 = c; +} + /* functions that are in m_pd.h but don't exist in modern versions of pd */ %ignore pd_getfilename; %ignore pd_getdirname; |