#35 update for Tcl 8.5

Don Porter

The internals of the "boolean"
Tcl_ObjType have changed in
Tcl 8.5. The attached patch
provides an update to tbcload
to deal with the changes.

Briefly, a "boolean" Tcl_Obj
serialized to a .tbc file in the
past might hold a string value
that can no longer be a
"boolean" Tcl_Obj after the
changes. To deal with the
changes, the attached patch
reads in anything that was
written as a "boolean" as
a type-less Tcl_Obj -- that is,
the call to Tcl_ConvertToType()
is not done.

For the values that would be
caught by the internals change,
this solves the problem. For the
values that would not cause any
trouble, all this change does is
delay the conversion to "boolean"
type until the value is first used
as a "boolean". Same processing
gets done, just shifted in time a bit.

This patch will need review and testing,
as I'm not a usual contributor to this


  • Don Porter

    Don Porter - 2005-05-19
  • David Zolli

    David Zolli - 2005-09-14

    Logged In: YES

    I've tested it with 8.5a4 and I've found the following
    script fails when sourced as .tbc file:

    proc foo {one args} {
    puts "one is $one"
    puts "args are $args"
    puts "Test #1:"
    foo un deux
    puts "Test #2:"
    foo un
    puts "Test #3:"
    foo un deux trois

    The result is:

    % source tbctest.tbc
    Test #1:
    one is un
    args are deux
    Test #2:
    wrong # args: should be "foo one ..."

    While it works fine as tcl script.
    FYI: the .tbc file was made with TclDevKit Compiler 3.1
    Build 121397

  • Don Porter

    Don Porter - 2005-09-14

    Logged In: YES

    does the failure happen
    with the patch? without it?
    or both?

  • David Zolli

    David Zolli - 2005-09-15

    Logged In: YES

    Only with the patch.

  • Don Porter

    Don Porter - 2006-03-03
    • assigned_to: nobody --> andreas_kupries
    • status: open --> pending-out-of-date
  • Don Porter

    Don Porter - 2006-03-03

    Logged In: YES

    The HEAD of Tcl 8.5 has
    been revised so this patch
    should no longer be needed.

    dzolli, if could test CVS Tcl 8.5
    plus unpatched tbcload plus your
    TDK 3.1 -made .tbc test script
    to see whether this resolves
    your issue, that would be helpful.

  • David Zolli

    David Zolli - 2006-03-03

    Logged In: YES

    I tried with tclkit85 built from CVS, test.tbc script made with TDK 3.2 and it
    works perfectly now.

  • SourceForge Robot

    Logged In: YES

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

  • SourceForge Robot

    • status: pending-out-of-date --> closed-out-of-date

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks