summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2006-08-28 04:13:32 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2006-08-28 04:13:32 (GMT)
commit1f7a4c65f4cdd102ebde7c2058fff469686829f8 (patch)
tree75a47e078869170518b2daf7e404d8fbc7f4c0cd
parent8d05e9798827f58abf7ac5d5d28d2b03ede92daa (diff)
downloadtcl-1f7a4c65f4cdd102ebde7c2058fff469686829f8.zip
tcl-1f7a4c65f4cdd102ebde7c2058fff469686829f8.tar.gz
tcl-1f7a4c65f4cdd102ebde7c2058fff469686829f8.tar.bz2
Fixes for [Bug 1547662] and [Bug 1547681]
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclClock.c15
-rw-r--r--generic/tclNamesp.c4
3 files changed, 21 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 875f18b..888cb70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-27 Joe Mistachkin <joe@mistachkin.com>
+
+ * generic/tclClock.c (ClockClicksObjCmd): Fix nested macro breakage
+ with TCL_MEM_DEBUG enabled. [Bug 1547662]
+
+ * generic/tclNamesp.c (NamespaceUpvarCmd): Fix panic with TCL_MEM_DEBUG
+ enabled caused by incorrect usage of TclFormatObj (missing trailing
+ NULL argument). [Bug 1547681]
+
2006-08-26 Miguel Sofer <msofer@users.sf.net>
* doc/namespace.n:
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 35bae5b..fb5c144 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclClock.c,v 1.57 2006/08/21 01:08:41 das Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.58 2006/08/28 04:13:32 mistachkin Exp $
*/
#include "tclInt.h"
@@ -1666,6 +1666,11 @@ ClockClicksObjCmd(
};
int index = CLICKS_NATIVE;
Tcl_Time now;
+#ifndef TCL_WIDE_CLICKS
+ unsigned long clicks;
+#else
+ Tcl_WideInt clicks;
+#endif
switch (objc) {
case 1:
@@ -1688,13 +1693,13 @@ ClockClicksObjCmd(
now.sec * 1000 + now.usec / 1000 ) );
break;
case CLICKS_NATIVE:
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj( (Tcl_WideInt)
#ifndef TCL_WIDE_CLICKS
- TclpGetClicks()
+ clicks = TclpGetClicks();
#else
- TclpGetWideClicks()
+ clicks = TclpGetWideClicks();
#endif
- ));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj( (Tcl_WideInt)
+ clicks ) );
break;
case CLICKS_MICROS:
Tcl_GetTime(&now);
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 89f1618..f33358d 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -22,7 +22,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.98 2006/08/26 13:00:39 msofer Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.99 2006/08/28 04:13:32 mistachkin Exp $
*/
#include "tclInt.h"
@@ -4608,7 +4608,7 @@ NamespaceUpvarCmd(
Tcl_Obj *resPtr;
TclNewObj(resPtr);
- TclFormatObj(NULL, resPtr, "namespace \"%s\" does not exist", objv[2]);
+ TclFormatObj(NULL, resPtr, "namespace \"%s\" does not exist", objv[2], NULL);
Tcl_SetObjResult(interp, resPtr);
return TCL_ERROR;
}