aboutsummaryrefslogtreecommitdiff
path: root/tclpd.tcl
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2011-11-16 10:44:23 +0000
committermescalinum <mescalinum@users.sourceforge.net>2011-11-16 10:44:23 +0000
commit166834e24345a3866b67e536232b4c19ea7d89c6 (patch)
tree9ff7681dc169587df305a0c653278a106aa48de0 /tclpd.tcl
parent6fa52928ea68ca9e0f51f8df0ce549555e984897 (diff)
use m_pd.h constants instead of their numerical value
svn path=/trunk/externals/loaders/tclpd/; revision=15753
Diffstat (limited to 'tclpd.tcl')
-rw-r--r--tclpd.tcl14
1 files changed, 4 insertions, 10 deletions
diff --git a/tclpd.tcl b/tclpd.tcl
index a93fc84..f98a2fe 100644
--- a/tclpd.tcl
+++ b/tclpd.tcl
@@ -70,8 +70,7 @@ namespace eval ::pd {
}
proc read_class_options {classname options} {
- set patchable_flag 1
- set noinlet_flag 0
+ set flag $::CLASS_DEFAULT
foreach {k v} $options {
switch -- $k {
@@ -79,19 +78,20 @@ namespace eval ::pd {
if {$v != 0 && $v != 1} {
return -code error [error_msg "-patchable must be 0/1"]
}
- set patchable_flag $v
+ set flag [expr {$flag|($::CLASS_PATCHABLE*$v)}]
}
-noinlet {
if {$v != 0 && $v != 1} {
return -code error [error_msg "-noinlet must be 0/1"]
}
- set noinlet_flag $v
+ set flag [expr {$flag|($::CLASS_NOINLET*$v)}]
}
default {
return -code error [error_msg "unknown option: $k"]
}
}
}
+ # TODO: c->c_gobj = (typeflag >= CLASS_GOBJ)
proc ::${classname}::dispatcher {self function args} "
if {\$function eq {method}} {
@@ -127,12 +127,6 @@ namespace eval ::pd {
# some dummy function to suppress eventual errors if they are not deifned:
proc ::${classname}::0_loadbang {self} {}
- # TODO: c->c_gobj = (typeflag >= CLASS_GOBJ)
- set flag [expr {
- 8 * ($noinlet_flag != 0) +
- 3 * ($patchable_flag != 0)
- }]
-
return $flag
}