diff options
author | dgp <dgp@users.sourceforge.net> | 2005-09-14 21:32:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-09-14 21:32:16 (GMT) |
commit | 62b5bf66c2c8dda87b14b78f81bc58a02cdfb172 (patch) | |
tree | 82a5606aa3a2ef7d0ea577afdb0814e7a2a96e48 /generic/tclCkalloc.c | |
parent | dc74c2b374a963186c53482685a2c91773ade3da (diff) | |
download | tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.zip tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.tar.gz tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.tar.bz2 |
* generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed to
support "*" fields and needed to interpret precision limits on
%s conversions as a maximum number of bytes, not Tcl_UniChars, to
take from the (char *) argument.
* generic/tclBasic.c: Updated several callers to use
* generic/tclCkalloc.c: TclFormatToErrorInfo() and/or
* generic/tclCmdAH.c: TclObjPrintf().
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclDictObj.c:
* generic/tclExecute.c:
* generic/tclIORChan.c:
* generic/tclIOUtil.c:
* generic/tclNamesp.c:
* generic/tclProc.c:
Diffstat (limited to 'generic/tclCkalloc.c')
-rw-r--r-- | generic/tclCkalloc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 595c24a..43e0862 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -14,7 +14,7 @@ * * This code contributed by Karl Lehenbauer and Mark Diekhans * - * RCS: @(#) $Id: tclCkalloc.c,v 1.23 2005/07/19 22:45:35 dkf Exp $ + * RCS: @(#) $Id: tclCkalloc.c,v 1.24 2005/09/14 21:32:17 dgp Exp $ */ #include "tclInt.h" @@ -843,14 +843,13 @@ MemoryCmd(clientData, interp, argc, argv) return TCL_OK; } if (strcmp(argv[1],"info") == 0) { - char buf[400]; - sprintf(buf, "%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n", + TclObjPrintf(NULL, Tcl_GetObjResult(interp), + "%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n%-25s %10d\n", "total mallocs", total_mallocs, "total frees", total_frees, "current packets allocated", current_malloc_packets, "current bytes allocated", current_bytes_malloced, "maximum packets allocated", maximum_malloc_packets, "maximum bytes allocated", maximum_bytes_malloced); - Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } if (strcmp(argv[1],"init") == 0) { |