Tcl Source Code

Check-in [67e1ea3939]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:unused variable fix
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-branch
Files: files | file ages | folders
SHA3-256: 67e1ea39392f27574bbfb1f4bfc84f5dc096c4344b51fe009672a3946df20b7d
User & Date: dgp 2018-03-14 17:20:53
Context
2018-03-14
18:08
merge 8.6 check-in: 010cc4a688 user: dgp tags: core-8-branch
17:21
merge 8.7 check-in: 86f7de7c98 user: dgp tags: trunk
17:20
unused variable fix check-in: 67e1ea3939 user: dgp tags: core-8-branch
15:17
New routine TclStringReplace() serves as a common implementation for both compiled and direct eval p... check-in: 190272213a user: dgp tags: core-8-branch
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to generic/tclCmdMZ.c.

  2301   2301   static int
  2302   2302   StringRplcCmd(
  2303   2303       ClientData dummy,		/* Not used. */
  2304   2304       Tcl_Interp *interp,		/* Current interpreter. */
  2305   2305       int objc,			/* Number of arguments. */
  2306   2306       Tcl_Obj *const objv[])	/* Argument objects. */
  2307   2307   {
  2308         -    Tcl_UniChar *ustring;
  2309   2308       int first, last, length, end;
  2310   2309   
  2311   2310       if (objc < 4 || objc > 5) {
  2312   2311   	Tcl_WrongNumArgs(interp, 1, objv, "string first last ?string?");
  2313   2312   	return TCL_ERROR;
  2314   2313       }
  2315   2314   
  2316         -    ustring = Tcl_GetUnicodeFromObj(objv[1], &length);
         2315  +    length = Tcl_GetCharLength(objv[1]);
  2317   2316       end = length - 1;
  2318   2317   
  2319   2318       if (TclGetIntForIndexM(interp, objv[2], end, &first) != TCL_OK ||
  2320   2319   	    TclGetIntForIndexM(interp, objv[3], end, &last) != TCL_OK){
  2321   2320   	return TCL_ERROR;
  2322   2321       }
  2323   2322