#1190 TCL8 internal complaints

obsolete: 8.0p2

OriginalBugID: 653 Bug
Version: 8.0p2
SubmitDate: '1998-05-25'
LastModified: '2000-04-09'
Severity: MED
Status: Assigned
Submitter: hershey
ChangedBy: hobbs
RelatedBugIDs: 4087
OS: All
OSVersion: NA
Machine: NA
FixedDate: '2000-10-25'
FixedInVersion: NA
ClosedDate: '2000-10-25'

From: mi@rtfm.ziplink.net (Mikhail Teterin)
Very minor. Fixes will not affect any existing code.

1. The internalRep union of the Tcl_Obj structure to have all/most
of the other types: float, char, and the corresponding unsigneds.
This will make creating new types a bit easier.

Workaround: create a file with your declartion for Tcl_Obj and
ifdef this declaration in tcl.h

2. The code in Tcl_GetIntFromObj() uses a clever trick to determine
if the content of longValue can be stored as int. This is done
every time at runtime. On many platforms (including Windoze, even
on Alpha), int and long are the same, making the check useless
-- it should only be compiled in, if configure determines it is

#if sizeof(int)=sizeof(long)
# define Tcl_GetIntFromObj Tcl_GetLongFromObj

More serious:

3. In several places pointers are is casted into int, which makes it
impossible to build TCL on mips4 without -n32.

#3 is no longer pertinent with 8.2+ (any remaining such casts
should be OK). #1 can be solved by doing the casts yourself,
or using the pointers. #2 could be improved (better to just
support longs as much as possible).
-- 03/29/2000 hobbs


  • Donal K. Fellows

    • status: open --> closed-fixed
  • Donal K. Fellows

    I'm closing this as all the points are now either fixed, have got trivial workarounds, or are going to become less relevant as the code is just generally cleaned up.