Itcl - the [incr Tcl] extension

Changes On Branch mistake
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch mistake Excluding Merge-Ins

This is equivalent to a diff from 603b079707 to 2e6df8f3ed

2023-11-08
19:48
Upgrade the remaining uses of [trace variable].

Oops. sync failure. Ignore this. Closed-Leaf check-in: 2e6df8f3ed user: dgp tags: mistake

2023-04-23
22:01
Finish Tcl9 conversion check-in: 53176e9710 user: jan.nijtmans tags: trunk, main
2022-11-04
10:05
More usage of Tcl_Size, in stead of #if's check-in: 603b079707 user: jan.nijtmans tags: trunk, main, itcl-4-2-3
2022-11-02
09:53
minor update to rules.vc check-in: f72685259b user: jan.nijtmans tags: trunk, main

Changes to generic/itclBase.c.

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
 */

static const char safeInitScript[] =
"proc ::itcl::local {class name args} {\n"
"    set ptr [uplevel [list $class $name] $args]\n"
"    uplevel [list set itcl-local-$ptr $ptr]\n"
"    set cmd [uplevel namespace which -command $ptr]\n"
"    uplevel [list trace variable itcl-local-$ptr u \"::itcl::delete object $cmd; list\"]\n"
"    return $ptr\n"
"}";

static const char *clazzClassScript =
"::oo::class create ::itcl::clazz {\n"
"  superclass ::oo::class\n"
"  method unknown args {\n"







|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
 */

static const char safeInitScript[] =
"proc ::itcl::local {class name args} {\n"
"    set ptr [uplevel [list $class $name] $args]\n"
"    uplevel [list set itcl-local-$ptr $ptr]\n"
"    set cmd [uplevel namespace which -command $ptr]\n"
"    uplevel [list trace add variable itcl-local-$ptr unset \"::itcl::delete object $cmd; list\"]\n"
"    return $ptr\n"
"}";

static const char *clazzClassScript =
"::oo::class create ::itcl::clazz {\n"
"  superclass ::oo::class\n"
"  method unknown args {\n"

Changes to library/itcl.tcl.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#  This command is useful for creating objects that should only remain
#  alive until a procedure exits.
# ----------------------------------------------------------------------
proc ::itcl::local {class name args} {
    set ptr [uplevel [list $class $name] $args]
    uplevel [list set itcl-local-$ptr $ptr]
    set cmd [uplevel namespace which -command $ptr]
    uplevel [list trace variable itcl-local-$ptr u \
        "::itcl::delete_helper $cmd"]
    return $ptr
}

# ----------------------------------------------------------------------
# auto_mkindex
# ----------------------------------------------------------------------







|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#  This command is useful for creating objects that should only remain
#  alive until a procedure exits.
# ----------------------------------------------------------------------
proc ::itcl::local {class name args} {
    set ptr [uplevel [list $class $name] $args]
    uplevel [list set itcl-local-$ptr $ptr]
    set cmd [uplevel namespace which -command $ptr]
    uplevel [list trace add variable itcl-local-$ptr unset \
        "::itcl::delete_helper $cmd"]
    return $ptr
}

# ----------------------------------------------------------------------
# auto_mkindex
# ----------------------------------------------------------------------