Tcl Source Code

View Ticket
Login
Ticket UUID: 1037454
Title: GET_WIDE_OR_INT assumes shimmer?
Type: Bug Created on: 2004-09-30 02:25:12
Submitter: dgp Assigned to: kennykb
Subsystem: 47. Bytecode Compiler Severity:
Priority: 5 Medium Last modified: 2004-09-30 21:36:23
Status: Closed Closed by: kennykb
Resolution: Works For Me Closed on: 2004-09-30 14:36:23
Version: obsolete: 8.5a2
Description:
The GET_WIDE_OR_INT macro
in tclExecute.c appears to assume
that a call to Tcl_GetWideIntFromObj
will shimmer a Tcl_Obj to the
"wideInt" Tcl_ObjType.

I think recent revisions to the HEAD
have made that no longer something
that can be assumed.
User Comments:
dkf added on 2004-09-30 17:34:41:
Logged In: YES 
user_id=79902

This analysis is correct; the macro should be re-examined to
see if it is still functioning as intended. (At least it's
just one macro to be checked and not all the places where
the macro is currently used!)

Note that this is an area where shimmering between
tclIntType and tclWideIntType is required to maintain the
current semantics. Whether or not the current semantics is
correct is a separate issue, of course. :^D

dkf added on 2004-09-30 19:09:28:
Logged In: YES 
user_id=79902

Correction: Tcl_GetWideIntFromObj() currently forces
wide-int interpretation. This issue is something to watch
out for going forward though; assigning to kbk as he's the
guy gunning for the crazy aunts...

kennykb added on 2004-09-30 21:36:23:
Logged In: YES 
user_id=99768

Yes, I know.  :)

 tclExecute.c is intimate with the tclObj.c data types.
It's probably less than ideal, but it does squeeze out a bit
more
performance.