diff options
| author | dgp@users.sourceforge.net <dgp> | 2011-03-16 14:13:32 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2011-03-16 14:13:32 (GMT) |
| commit | f4572809fe8eb9e16b92f2ef39cc4e71c75d6240 (patch) | |
| tree | c471d2de916c3cac050922646092534391a2bbca /generic/tclProc.c | |
| parent | 9086b6567f6c0af4389e0b3b8096eee5c6000cbc (diff) | |
| download | tcl-f4572809fe8eb9e16b92f2ef39cc4e71c75d6240.zip tcl-f4572809fe8eb9e16b92f2ef39cc4e71c75d6240.tar.gz tcl-f4572809fe8eb9e16b92f2ef39cc4e71c75d6240.tar.bz2 | |
Rewrites to eliminate isspace() calls.
Diffstat (limited to 'generic/tclProc.c')
| -rw-r--r-- | generic/tclProc.c | 11 |
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; } /* |
