summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-02 18:18:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-02 18:18:31 (GMT)
commit6d61d799f483c98a1e0aeb624fa001a7fce24af0 (patch)
treea67b9ccfa323ad24c93a2fc2f7011cfa8ee0ba63 /generic/tkFont.c
parent8d2dbe96066152901e507e44cf7dec9b00f2bee3 (diff)
downloadtk-6d61d799f483c98a1e0aeb624fa001a7fce24af0.zip
tk-6d61d799f483c98a1e0aeb624fa001a7fce24af0.tar.gz
tk-6d61d799f483c98a1e0aeb624fa001a7fce24af0.tar.bz2
More use of Tcl_NewWideIntObj(), and more internal use of (size_t), for bigger ranges.
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index c0ff7d0..053524c 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -731,7 +731,7 @@ Tk_FontObjCmd(
return TCL_ERROR;
}
string = TkGetStringFromObj(objv[3 + skip], &length);
- Tcl_SetObjResult(interp, Tcl_NewIntObj(
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
Tk_TextWidth(tkfont, string, length)));
Tk_FreeFont(tkfont);
break;
@@ -778,7 +778,7 @@ Tk_FontObjCmd(
case 2: i = fmPtr->ascent + fmPtr->descent; break;
case 3: i = fmPtr->fixed; break;
}
- Tcl_SetObjResult(interp, Tcl_NewIntObj(i));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(i));
}
Tk_FreeFont(tkfont);
break;
@@ -3494,9 +3494,9 @@ GetAttributeInfoObj(
case FONT_SIZE:
if (faPtr->size >= 0.0) {
- valuePtr = Tcl_NewIntObj((int)(faPtr->size + 0.5));
+ valuePtr = Tcl_NewWideIntObj((Tcl_WideInt)(faPtr->size + 0.5));
} else {
- valuePtr = Tcl_NewIntObj(-(int)(-faPtr->size + 0.5));
+ valuePtr = Tcl_NewWideIntObj(-(Tcl_WideInt)(-faPtr->size + 0.5));
}
break;