aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-06-02 22:51:38 +0000
committerN.N. <matju@users.sourceforge.net>2009-06-02 22:51:38 +0000
commit9ed8bacb8394a853a907519c07b4feef0ffc9248 (patch)
tree9244dc05ea0d7cb679da74f5ac20e9c1d243fed5
parentda93ca3e2e6919ac53562edb407ba76c436a47db (diff)
reformat
svn path=/trunk/; revision=11630
-rw-r--r--desiredata/src/kernel.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/desiredata/src/kernel.c b/desiredata/src/kernel.c
index 504fa0af..357df17f 100644
--- a/desiredata/src/kernel.c
+++ b/desiredata/src/kernel.c
@@ -510,19 +510,19 @@ static void pointerinlet_pointer(t_inlet *x, t_gpointer *gp) {
static void floatinlet_float( t_inlet *x, t_float f) {*x->u.floatslot = f;}
static void symbolinlet_symbol(t_inlet *x, t_symbol *s) {*x->u.symslot = s;}
-#define COMMON \
+#define COMMON(qlass,sym,slot) \
+ t_inlet *x=(t_inlet *)pd_new(qlass); \
+ x->symfrom=&sym; \
+ x->u.slot = p; \
x->owner = owner; \
x->dest = 0; \
x->next = 0; \
object_append_inlet(owner,x); \
return x;
-t_inlet * floatinlet_new(t_object *owner, t_float * fp) {t_inlet *x=(t_inlet *)pd_new(floatinlet_class);
- x->symfrom=&s_float; x->u.floatslot =fp; COMMON}
-t_inlet * symbolinlet_new(t_object *owner, t_symbol ** sp) {t_inlet *x=(t_inlet *)pd_new(symbolinlet_class);
- x->symfrom=&s_symbol; x->u.symslot =sp; COMMON}
-t_inlet *pointerinlet_new(t_object *owner, t_gpointer *gp) {t_inlet *x=(t_inlet *)pd_new(pointerinlet_class);
- x->symfrom=&s_pointer; x->u.pointerslot=gp; COMMON}
+t_inlet * floatinlet_new(t_object *owner, t_float * p) {COMMON( floatinlet_class,s_float ,floatslot )}
+t_inlet * symbolinlet_new(t_object *owner, t_symbol ** p) {COMMON( symbolinlet_class,s_symbol ,symslot )}
+t_inlet *pointerinlet_new(t_object *owner, t_gpointer *p) {COMMON(pointerinlet_class,s_pointer,pointerslot)}
#undef COMMON
/* ---------------------- routine to handle lists ---------------------- */