summaryrefslogtreecommitdiffstats
path: root/generic/tclLink.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclLink.c')
-rw-r--r--generic/tclLink.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c
index 0d57d44..af48302 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -553,7 +553,7 @@ GetUWide(
*/
return 1;
}
-#ifdef WORDS_BIGENDIAN
+#ifndef WORDS_BIGENDIAN
while (numBytes-- > 0) {
value = (value << CHAR_BIT) | *bytes++;
}
@@ -1451,12 +1451,12 @@ ObjValue(
}
linkPtr->lastValue.f = LinkedVar(float);
return Tcl_NewDoubleObj(linkPtr->lastValue.f);
- case TCL_LINK_WIDE_UINT:
+ case TCL_LINK_WIDE_UINT: {
if (linkPtr->flags & LINK_ALLOC_LAST) {
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
for (i=0; i < linkPtr->numElems; i++) {
- TclNewIntObj(objv[i], (Tcl_WideInt)
+ TclNewUIntObj(objv[i],
linkPtr->lastValue.uwPtr[i]);
}
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
@@ -1464,7 +1464,10 @@ ObjValue(
return resultObj;
}
linkPtr->lastValue.uw = LinkedVar(Tcl_WideUInt);
- return Tcl_NewWideIntObj((Tcl_WideInt) linkPtr->lastValue.uw);
+ Tcl_Obj *uwObj;
+ TclNewUIntObj(uwObj, linkPtr->lastValue.uw);
+ return uwObj;
+ }
case TCL_LINK_STRING:
p = LinkedVar(char *);