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.
Logged In: YES
user_id=80530
work in progress towards a proposed fix.
Logged In: YES
user_id=80530
updated patch. please review.
Logged In: YES
user_id=80530
Raising priority. This is no longer
a theoretical problem for extension
authors. Now the HEAD will not build.
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.
Logged In: YES
user_id=80530
here's an updated patch made
against the current HEAD.
Dropped priority since the
HEAD compiles now.
Logged In: YES
user_id=80530
Fixed in 8.4 branch and HEAD.