Tcl Source Code

Check-in [1799506222]
Login

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

Overview
Comment:Use memcmp where possible.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1799506222b738a52520a1bb206e71ff87567697
User & Date: dgp 2016-10-18 19:16:35
Context
2016-10-21
13:12
merge 8.6 check-in: 5860b1c25b user: dgp tags: trunk
2016-10-20
16:37
merge trunk check-in: b1dcc7542c user: dgp tags: tip-445
2016-10-18
19:16
Use memcmp where possible. check-in: 1799506222 user: dgp tags: trunk
2016-10-14
19:29
[eb6b68c1a9] Simple fix for [string replace] error demonstrated by new test. check-in: 699a33324b user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclCmdMZ.c.

1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253

	end = haystackStr + haystackLen - needleLen + 1;
	for (p = haystackStr;  p < end;  p++) {
	    /*
	     * Scan forward to find the first character.
	     */

	    if ((*p == *needleStr) && (TclUniCharNcmp(needleStr, p,
		    (unsigned long) needleLen) == 0)) {
		match = p - haystackStr;
		break;
	    }
	}
    }

    /*







|
|







1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253

	end = haystackStr + haystackLen - needleLen + 1;
	for (p = haystackStr;  p < end;  p++) {
	    /*
	     * Scan forward to find the first character.
	     */

	    if ((*p == *needleStr) && (memcmp(needleStr, p,
		    sizeof(Tcl_UniChar) * (size_t)needleLen) == 0)) {
		match = p - haystackStr;
		break;
	    }
	}
    }

    /*