diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-08-12 21:58:10 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-08-12 21:58:10 (GMT) |
commit | 03a98e8337487e74191cf5e805cc9d8a5481e952 (patch) | |
tree | e1f249a72daeb2b5f4ea2f0bb77b1255a9666f91 /generic/tclCmdMZ.c | |
parent | efa688b6e4162c0ca4b41a86e5319422ed43adb8 (diff) | |
download | tcl-03a98e8337487e74191cf5e805cc9d8a5481e952.zip tcl-03a98e8337487e74191cf5e805cc9d8a5481e952.tar.gz tcl-03a98e8337487e74191cf5e805cc9d8a5481e952.tar.bz2 |
* generic/tclCmdMZ.c (Tcl_SplitObjCmd): use TclNewStringObj macro
instead of calling the function.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); |