summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-01-21 14:55:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-01-21 14:55:48 (GMT)
commit81ff18c2b630d51f598641ab3e497268b76550ca (patch)
tree18fc94550773ccba8dc4240a2c99bb524967e397
parent36189b7eca7e68a19d5e4d9cdf712f3aef322398 (diff)
parent093b0618b6e6bef06c090aab243ad716995ba4b5 (diff)
downloadtcl-81ff18c2b630d51f598641ab3e497268b76550ca.zip
tcl-81ff18c2b630d51f598641ab3e497268b76550ca.tar.gz
tcl-81ff18c2b630d51f598641ab3e497268b76550ca.tar.bz2
merge 8.5
-rw-r--r--generic/tclClock.c10
-rw-r--r--generic/tclExecute.c12
-rw-r--r--macosx/tclMacOSXBundle.c4
3 files changed, 14 insertions, 12 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 32ba145..782c681 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -562,8 +562,9 @@ ClockGetjuliandayfromerayearmonthdayObjCmd (
|| TclGetIntFromObj(interp, fieldPtr,
&(fields.dayOfMonth)) != TCL_OK
|| TclGetIntFromObj(interp, objv[2], &changeover) != TCL_OK) {
- if (fieldPtr == NULL)
- Tcl_SetObjResult(interp, Tcl_NewStringObj("expected key(s) not found in dictionary", -1));
+ if (fieldPtr == NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("expected key(s) not found in dictionary", -1));
+ }
return TCL_ERROR;
}
fields.era = era;
@@ -655,8 +656,9 @@ ClockGetjuliandayfromerayearweekdayObjCmd (
|| fieldPtr == NULL
|| TclGetIntFromObj(interp, fieldPtr, &(fields.dayOfWeek)) != TCL_OK
|| TclGetIntFromObj(interp, objv[2], &changeover) != TCL_OK) {
- if (fieldPtr == NULL)
- Tcl_SetObjResult(interp, Tcl_NewStringObj("expected key(s) not found in dictionary", -1));
+ if (fieldPtr == NULL) {
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("expected key(s) not found in dictionary", -1));
+ }
return TCL_ERROR;
}
fields.era = era;
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 248b1b3..bfb9d17 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -280,6 +280,8 @@ VarHashCreateVar(
#define CURR_DEPTH (tosPtr - initTosPtr)
+#define STACK_BASE(esPtr) ((esPtr)->stackWords - 1)
+
/*
* Macros used to trace instruction execution. The macros TRACE,
* TRACE_WITH_OBJ, and O2S are only used inside TclExecuteByteCode. O2S is
@@ -722,7 +724,7 @@ TclCreateExecEnv(
esPtr->nextPtr = NULL;
esPtr->markerPtr = NULL;
esPtr->endPtr = &esPtr->stackWords[TCL_STACK_INITIAL_SIZE-1];
- esPtr->tosPtr = &esPtr->stackWords[-1];
+ esPtr->tosPtr = STACK_BASE(esPtr);
Tcl_MutexLock(&execMutex);
if (!execInitialized) {
@@ -934,8 +936,8 @@ GrowEvaluationStack(
if (esPtr->nextPtr) {
oldPtr = esPtr;
esPtr = oldPtr->nextPtr;
- currElems = esPtr->endPtr - &esPtr->stackWords[-1];
- if (esPtr->markerPtr || (esPtr->tosPtr != &esPtr->stackWords[-1])) {
+ currElems = esPtr->endPtr - STACK_BASE(esPtr);
+ if (esPtr->markerPtr || (esPtr->tosPtr != STACK_BASE(esPtr))) {
Tcl_Panic("STACK: Stack after current is in use");
}
if (esPtr->nextPtr) {
@@ -947,7 +949,7 @@ GrowEvaluationStack(
DeleteExecStack(esPtr);
esPtr = oldPtr;
} else {
- currElems = esPtr->endPtr - &esPtr->stackWords[-1];
+ currElems = esPtr->endPtr - STACK_BASE(esPtr);
}
/*
@@ -1089,7 +1091,7 @@ TclStackFree(
* Return to previous stack.
*/
- esPtr->tosPtr = &esPtr->stackWords[-1];
+ esPtr->tosPtr = STACK_BASE(esPtr);
if (esPtr->prevPtr) {
eePtr->execStackPtr = esPtr->prevPtr;
}
diff --git a/macosx/tclMacOSXBundle.c b/macosx/tclMacOSXBundle.c
index c4fc82d..b2a88e5 100644
--- a/macosx/tclMacOSXBundle.c
+++ b/macosx/tclMacOSXBundle.c
@@ -237,9 +237,7 @@ Tcl_MacOSXOpenVersionedBundleResources(
}
if (openresourcemap) {
- short refNum;
-
- refNum = openresourcemap(bundleRef);
+ openresourcemap(bundleRef);
}
}