diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-01 15:49:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-01 15:49:33 (GMT) |
commit | 6c9d67ac2ce6b610bb42688c03d6abf8e99f2a6b (patch) | |
tree | e0af1794b6829d3f838125af8b8c1f94632a35fc /generic/tkTest.c | |
parent | 88df780305133662dbb17971c05b9663a2b69f9d (diff) | |
download | tk-6c9d67ac2ce6b610bb42688c03d6abf8e99f2a6b.zip tk-6c9d67ac2ce6b610bb42688c03d6abf8e99f2a6b.tar.gz tk-6c9d67ac2ce6b610bb42688c03d6abf8e99f2a6b.tar.bz2 |
some more int -> size_t changes
Diffstat (limited to 'generic/tkTest.c')
-rw-r--r-- | generic/tkTest.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c index 782af01..ca0aa6a 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -1981,7 +1981,7 @@ CustomOptionSet( char *saveInternalPtr, int flags) { - int objEmpty, length; + int objEmpty; char *newStr, *string, *internalPtr; objEmpty = 0; @@ -2002,14 +2002,14 @@ CustomOptionSet( } else if ((*value)->bytes != NULL) { objEmpty = ((*value)->length == 0); } else { - (void)Tcl_GetStringFromObj(*value, &length); - objEmpty = (length == 0); + (void)Tcl_GetString(*value); + objEmpty = ((*value)->length == 0); } if ((flags & TK_OPTION_NULL_OK) && objEmpty) { *value = NULL; } else { - string = Tcl_GetStringFromObj(*value, &length); + string = Tcl_GetString(*value); Tcl_UtfToUpper(string); if (strcmp(string, "BAD") == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("expected good value, got \"BAD\"", -1)); @@ -2018,8 +2018,8 @@ CustomOptionSet( } if (internalPtr != NULL) { if (*value != NULL) { - string = Tcl_GetStringFromObj(*value, &length); - newStr = ckalloc(length + 1); + string = Tcl_GetString(*value); + newStr = ckalloc((*value)->length + 1); strcpy(newStr, string); } else { newStr = NULL; |