summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-08-12 21:58:10 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-08-12 21:58:10 (GMT)
commit03a98e8337487e74191cf5e805cc9d8a5481e952 (patch)
treee1f249a72daeb2b5f4ea2f0bb77b1255a9666f91
parentefa688b6e4162c0ca4b41a86e5319422ed43adb8 (diff)
downloadtcl-03a98e8337487e74191cf5e805cc9d8a5481e952.zip
tcl-03a98e8337487e74191cf5e805cc9d8a5481e952.tar.gz
tcl-03a98e8337487e74191cf5e805cc9d8a5481e952.tar.bz2
* generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macro
instead of calling the function.
-rw-r--r--ChangeLog3
-rw-r--r--generic/tclCmdMZ.c10
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ae1007..92b6f21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-08-12 Miguel Sofer <msofer@users.sf.net>
+ * generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macro
+ instead of calling the function.
+
* generic/tcl_Obj.c (TclAllocateFreeObjects): remove unneeded
memset to 0 of all allocated objects.
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 205dd7d..7da20c5 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.153 2007/06/20 18:46:08 dgp Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.154 2007/08/12 21:58:11 msofer Exp $
*/
#include "tclInt.h"
@@ -1026,7 +1026,7 @@ Tcl_SplitObjCmd(
hPtr = Tcl_CreateHashEntry(&charReuseTable, (char*)0+ch, &isNew);
if (isNew) {
- objPtr = Tcl_NewStringObj(stringPtr, len);
+ TclNewStringObj(objPtr, stringPtr, len);
/*
* Don't need to fiddle with refcount...
@@ -1054,7 +1054,7 @@ Tcl_SplitObjCmd(
Tcl_ListObjAppendElement(NULL, listPtr, objPtr);
stringPtr = p + 1;
}
- objPtr = Tcl_NewStringObj(stringPtr, end - stringPtr);
+ TclNewStringObj(objPtr, stringPtr, end - stringPtr);
Tcl_ListObjAppendElement(NULL, listPtr, objPtr);
} else {
char *element, *p, *splitEnd;
@@ -1073,7 +1073,7 @@ Tcl_SplitObjCmd(
for (p = splitChars; p < splitEnd; p += splitLen) {
splitLen = TclUtfToUniChar(p, &splitChar);
if (ch == splitChar) {
- objPtr = Tcl_NewStringObj(element, stringPtr - element);
+ TclNewStringObj(objPtr, element, stringPtr - element);
Tcl_ListObjAppendElement(NULL, listPtr, objPtr);
element = stringPtr + len;
break;
@@ -1081,7 +1081,7 @@ Tcl_SplitObjCmd(
}
}
- objPtr = Tcl_NewStringObj(element, stringPtr - element);
+ TclNewStringObj(objPtr, element, stringPtr - element);
Tcl_ListObjAppendElement(NULL, listPtr, objPtr);
}
Tcl_SetObjResult(interp, listPtr);