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 | 8edadefd0920d3e5ebd7c1008b47eda121bb727f (patch) | |
tree | 9d78414244a27069e5362313cf542baba8dfefb1 /win/tkWinDialog.c | |
parent | b1b1f10a230df6067a002f8a0e138d488b14045e (diff) | |
parent | e8cf97ffd429ffb97333cd9f2518d4abce364f09 (diff) | |
download | tk-8edadefd0920d3e5ebd7c1008b47eda121bb727f.zip tk-8edadefd0920d3e5ebd7c1008b47eda121bb727f.tar.gz tk-8edadefd0920d3e5ebd7c1008b47eda121bb727f.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 'win/tkWinDialog.c')
-rw-r--r-- | win/tkWinDialog.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index 3b1351e..35d07d1 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -1161,12 +1161,13 @@ MakeFilter( *p = '\0'; } else { - int len; + size_t len; if (valuePtr == NULL) { len = 0; } else { - (void) Tcl_GetStringFromObj(valuePtr, &len); + (void) Tcl_GetString(valuePtr); + len = valuePtr->length; } /* @@ -2258,7 +2259,7 @@ FontchooserConfigureCmd( } for (i = 1; i < objc; i += 2) { - int optionIndex, len; + int optionIndex; if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings, sizeof(char *), "option", 0, &optionIndex) != TCL_OK) { @@ -2318,8 +2319,8 @@ FontchooserConfigureCmd( if (hdPtr->fontObj) { Tcl_DecrRefCount(hdPtr->fontObj); } - Tcl_GetStringFromObj(objv[i+1], &len); - if (len) { + (void)Tcl_GetString(objv[i+1]); + if (objv[i+1]->length) { hdPtr->fontObj = objv[i+1]; if (Tcl_IsShared(hdPtr->fontObj)) { hdPtr->fontObj = Tcl_DuplicateObj(hdPtr->fontObj); @@ -2333,8 +2334,8 @@ FontchooserConfigureCmd( if (hdPtr->cmdObj) { Tcl_DecrRefCount(hdPtr->cmdObj); } - Tcl_GetStringFromObj(objv[i+1], &len); - if (len) { + (void)Tcl_GetString(objv[i+1]); + if (objv[i+1]->length) { hdPtr->cmdObj = objv[i+1]; if (Tcl_IsShared(hdPtr->cmdObj)) { hdPtr->cmdObj = Tcl_DuplicateObj(hdPtr->cmdObj); |