Tcl Source Code

View Ticket
Login
Ticket UUID: 713562
Title: missing wideInt Tcl_ObjType
Type: Bug Version: obsolete: 8.4.2
Submitter: dgp Created on: 2003-04-01 22:11:38
Subsystem: 10. Objects Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-04-17 06:33:34
Resolution: Fixed Closed By: dgp
    Closed on: 2003-04-16 23:33:34
Description:
When I build and use Tcl on a platform where
TCL_WIDE_INT_IS_LONG gets #define'd,
like my Linux/Alpha machine, the consequence
is that there is no Tcl_ObjType named "wideInt"
registered in that Tcl library.

This means that an extension writer cannot
reliably Tcl_ConvertToType either to or from
the "wideInt" type across platforms.  Instead
extensions are required to do a rather complex
conditionalizing on TCL_WIDE_INT_IS_LONG.

Would be much nicer if the Tcl library always
defined the "wideInt" Tcl_ObjType, but just
made sure it did the right thing on different
platforms.

The most recent example is the TIP 111
implementation.  I cannot test this on my
Linux/Alpha box, because parts of it just
assume that comparisons against &tclWideIntType
are possible.  That's the internal version of
the exported description above.
User Comments: dgp added on 2003-04-17 06:33:34:
Logged In: YES 
user_id=80530


Fixed in 8.4 branch and HEAD.

dgp added on 2003-04-08 00:41:55:

File Deleted - 46559:

dgp added on 2003-04-08 00:41:54:

File Added - 47001: 713562.patch

Logged In: YES 
user_id=80530

here's an updated patch made
against the current HEAD.

Dropped priority since the
HEAD compiles now.

dgp added on 2003-04-07 23:23:23:
Logged In: YES 
user_id=80530


re-opened.  There's a problem with the
committed fix.

Although the "wideInt" type is now recognized,
on TCL_WIDE_INT_IS_LONG platforms, it
cannot be converted to.

Tcl_ConvertToType(interp, objPtr, Tcl_GetObjType("wideInt"))

wil convert objPtr to type "int" instead of the
requested type "wideInt".

The patch already attached here does not
suffer from that defect.

dgp added on 2003-04-05 15:24:19:
Logged In: YES 
user_id=80530

Raising priority.  This is no longer
a theoretical problem for extension
authors.  Now the HEAD will not build.

dgp added on 2003-04-02 14:56:34:

File Deleted - 46530: 



File Added - 46559: 713562.patch

Logged In: YES 
user_id=80530

updated patch.  please review.

dgp added on 2003-04-02 07:33:00:

File Added - 46530: 713562.patch

Logged In: YES 
user_id=80530

work in progress towards a proposed fix.

Attachments: