diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-27 14:31:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-27 14:31:12 (GMT) |
commit | 368a29cbf01f4aa930631726ce71aafe9c853f12 (patch) | |
tree | a2363b3cb1219295c38cd22d4f67ca2540b5446a /generic/tclProc.c | |
parent | d95abe6b6fe069f55ce27900c99fec5949d63a15 (diff) | |
download | tcl-368a29cbf01f4aa930631726ce71aafe9c853f12.zip tcl-368a29cbf01f4aa930631726ce71aafe9c853f12.tar.gz tcl-368a29cbf01f4aa930631726ce71aafe9c853f12.tar.bz2 |
Some code cleanup: More internal use of size_t, less type casts (because of this). No functional changes.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index bed520a..373192c 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -500,7 +500,8 @@ TclCreateProc( } for (i = 0; i < numArgs; i++) { - int fieldCount, nameLength, valueLength; + int fieldCount, nameLength; + size_t valueLength; const char **fieldValues; /* @@ -602,12 +603,11 @@ TclCreateProc( */ if (localPtr->defValuePtr != NULL) { - int tmpLength; - const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr, - &tmpLength); + const char *tmpPtr = TclGetString(localPtr->defValuePtr); + size_t tmpLength = localPtr->defValuePtr->length; if ((valueLength != tmpLength) || - strncmp(fieldValues[1], tmpPtr, (size_t) tmpLength)) { + strncmp(fieldValues[1], tmpPtr, tmpLength)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "procedure \"%s\": formal parameter \"%s\" has " "default value inconsistent with precompiled body", |