diff options
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; |