summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-03-16 14:13:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-03-16 14:13:32 (GMT)
commitdca2b08daf4b0c0cd16dfdf7d6b449c0448907d2 (patch)
treec471d2de916c3cac050922646092534391a2bbca /generic/tclProc.c
parentcb78c7f8a41f037806b2d4b1489bbd1e28f375a2 (diff)
downloadtcl-dca2b08daf4b0c0cd16dfdf7d6b449c0448907d2.zip
tcl-dca2b08daf4b0c0cd16dfdf7d6b449c0448907d2.tar.gz
tcl-dca2b08daf4b0c0cd16dfdf7d6b449c0448907d2.tar.bz2
Rewrites to eliminate isspace() calls.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 978c5f7..c63337c 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -320,6 +320,8 @@ Tcl_ProcObjCmd(
}
if ((procArgs[0] == 'a') && (strncmp(procArgs, "args", 4) == 0)) {
+ int numBytes;
+
procArgs +=4;
while(*procArgs != '\0') {
if (*procArgs != ' ') {
@@ -332,12 +334,9 @@ Tcl_ProcObjCmd(
* The argument list is just "args"; check the body
*/
- procBody = TclGetString(objv[3]);
- while (*procBody != '\0') {
- if (!isspace(UCHAR(*procBody))) {
- goto done;
- }
- procBody++;
+ procBody = Tcl_GetStringFromObj(objv[3], &numBytes);
+ if (TclParseAllWhiteSpace(procBody, numBytes) < numBytes) {
+ goto done;
}
/*