aboutsummaryrefslogtreecommitdiff
path: root/tcl_class.c
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2011-10-13 16:01:07 +0000
committermescalinum <mescalinum@users.sourceforge.net>2011-10-13 16:01:07 +0000
commit60745f7898be9a36bda18f94ad98a592f4b3fce9 (patch)
tree10eb3adacf2d4434679322c4f519e783d06aacbe /tcl_class.c
parent9085fd48a97c331a3a1adce1f914183e3f504f7c (diff)
fix the tclpd_get_instance_text bug in slider2
svn path=/trunk/externals/loaders/tclpd/; revision=15582
Diffstat (limited to 'tcl_class.c')
-rw-r--r--tcl_class.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tcl_class.c b/tcl_class.c
index 4e17bc7..307f4bf 100644
--- a/tcl_class.c
+++ b/tcl_class.c
@@ -104,7 +104,7 @@ static inline t_class* class_table_get(const char* name)
return (t_class*)list_get(class_tbl[h], name);
}
-static inline void object_table_add(const char* name, t_pd* o)
+static inline void object_table_add(const char* name, t_tcl* o)
{
uint32_t h = hash_str(name) % OBJECT_TABLE_SIZE;
object_tbl[h] = list_add(object_tbl[h], name, (void*)o);
@@ -116,7 +116,7 @@ static inline void object_table_remove(const char* name)
object_tbl[h] = list_remove(object_tbl[h], name);
}
-static inline t_pd* object_table_get(const char* name)
+static inline t_tcl* object_table_get(const char* name)
{
uint32_t h = hash_str(name) % OBJECT_TABLE_SIZE;
return (t_pd*)list_get(object_tbl[h], name);
@@ -333,6 +333,10 @@ t_pd* tclpd_get_instance_pd(const char* objectSequentialId) {
return (t_pd*)object_table_get(objectSequentialId);
}
+t_text* tclpd_get_instance_text(const char* objectSequentialId) {
+ return (t_text*)object_table_get(objectSequentialId);
+}
+
t_object* tclpd_get_object(const char* objectSequentialId) {
t_tcl* x = tclpd_get_instance(objectSequentialId);
return &x->o;