Overview
| Artifact ID: | 789be2a192a2e72c54bb09bed8a2089bf2837b45 |
|---|---|
| Ticket: | 699060ffffffffffffffffffffffffffffffffff
format %08x 32/64bit confusion |
| User & Date: | srwarren on 2003-03-08 10:59:23 |
Changes
- icomment:
Logged In: YES user_id=728162 Here's the info on the machine I'm using: % parray tcl_platform tcl_platform(byteOrder) = littleEndian tcl_platform(machine) = i686 tcl_platform(os) = Linux tcl_platform(osVersion) = 2.4.7-10custom tcl_platform(platform) = unix tcl_platform(user) = swarren tcl_platform(wordSize) = 4 % info patch 8.4.1 I also downloaded 8.4.2 and had the same issue. (Perhaps 64-bit (native) platform isn't the issue - it's just whether tclWideIntType is not the same as tclIntType, or whether the wide int representation isn't the same as the compiler's long type) I replace the code with this and it solved my issue, although it probably needs cleanup for the product since I wasn't very concerned about corner cases, architecture differences etc. etc. --------------------------------------- switch (*format) { case 'i': newPtr[-1] = 'd'; case 'd': case 'o': case 'u': case 'x': case 'X': #ifndef TCL_WIDE_INT_IS_LONG if (Tcl_GetWideIntFromObj(interp, /* INTL: Tcl source. */ objv[objIndex], &wideValue) != TCL_OK) { goto fmtError; } if (useWide) { whichValue = WIDE_VALUE; } else { whichValue = INT_VALUE; intValue = (wideValue & 0xffffffffU); } #else /* TCL_WIDE_INT_IS_LONG */ if (Tcl_GetLongFromObj(interp, /* INTL: Tcl source. */ objv[objIndex], &intValue) != TCL_OK) { goto fmtError; } whichValue = INT_VALUE; #endif /* TCL_WIDE_INT_IS_LONG */ ... as before --------------------------------------- - login: "srwarren"
- mimetype: "text/plain"
- username: "srwarren"