summaryrefslogtreecommitdiffstats
path: root/win/tkWinDialog.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-01 14:30:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-01 14:30:07 (GMT)
commit36cc0029458ead72be711c8c402f55a4fd26edd3 (patch)
tree9d78414244a27069e5362313cf542baba8dfefb1 /win/tkWinDialog.c
parentc122ab6dc1e84c1b07be22f6b1b3983df7268a68 (diff)
parent5f84e8bb5604b44e2682c85e6bf8724deb5c3257 (diff)
downloadtk-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 'win/tkWinDialog.c')
-rw-r--r--win/tkWinDialog.c15
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);