diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-01 14:30:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-01 14:30:07 (GMT) |
commit | 36cc0029458ead72be711c8c402f55a4fd26edd3 (patch) | |
tree | 9d78414244a27069e5362313cf542baba8dfefb1 /generic/tkTest.c | |
parent | c122ab6dc1e84c1b07be22f6b1b3983df7268a68 (diff) | |
parent | 5f84e8bb5604b44e2682c85e6bf8724deb5c3257 (diff) | |
download | tk-36cc0029458ead72be711c8c402f55a4fd26edd3.zip tk-36cc0029458ead72be711c8c402f55a4fd26edd3.tar.gz tk-36cc0029458ead72be711c8c402f55a4fd26edd3.tar.bz2 |
Use internalRep.twoPtrValue.ptr1 in stead of internalRep.otherValuePtr everywhere.
Change some internal "length" variables from type int to type size_t, so it could handle bigger string sizes (for "novem")
Diffstat (limited to 'generic/tkTest.c')
-rw-r--r-- | generic/tkTest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c index 13415c4..88c50fa 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -223,7 +223,7 @@ Tktest_Init( if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } - if (Tk_InitStubs(interp, "8.1", 0) == NULL) { + if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) { return TCL_ERROR; } @@ -2002,14 +2002,14 @@ CustomOptionSet( } else if ((*value)->bytes != NULL) { objEmpty = ((*value)->length == 0); } else { - Tcl_GetStringFromObj((*value), &length); + (void)Tcl_GetStringFromObj(*value, &length); objEmpty = (length == 0); } if ((flags & TK_OPTION_NULL_OK) && objEmpty) { *value = NULL; } else { - string = Tcl_GetStringFromObj((*value), &length); + string = Tcl_GetStringFromObj(*value, &length); Tcl_UtfToUpper(string); if (strcmp(string, "BAD") == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("expected good value, got \"BAD\"", -1)); @@ -2017,8 +2017,8 @@ CustomOptionSet( } } if (internalPtr != NULL) { - if ((*value) != NULL) { - string = Tcl_GetStringFromObj((*value), &length); + if (*valu) != NULL) { + string = Tcl_GetStringFromObj(*value, &length); newStr = ckalloc(length + 1); strcpy(newStr, string); } else { |