summaryrefslogtreecommitdiffstats
path: root/generic/tclArithSeries.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-28 12:58:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-28 12:58:58 (GMT)
commit93e50d1448aba1ed4b5eb113ea5c9b5debee85dc (patch)
tree9242c04b4f72981536f578bfc1b3774a4711d741 /generic/tclArithSeries.c
parent8b5a187d44e2ed11ef57b3a94e26e349a20ae2f0 (diff)
downloadtcl-93e50d1448aba1ed4b5eb113ea5c9b5debee85dc.zip
tcl-93e50d1448aba1ed4b5eb113ea5c9b5debee85dc.tar.gz
tcl-93e50d1448aba1ed4b5eb113ea5c9b5debee85dc.tar.bz2
int -> ListSizeT, and a few more simplifications
Diffstat (limited to 'generic/tclArithSeries.c')
-rwxr-xr-xgeneric/tclArithSeries.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclArithSeries.c b/generic/tclArithSeries.c
index 3974808..868ce74 100755
--- a/generic/tclArithSeries.c
+++ b/generic/tclArithSeries.c
@@ -106,8 +106,10 @@ ArithSeriesLen(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step)
{
Tcl_WideInt len;
- if (step == 0) return 0;
- len = (step ? (1 + (((end-start))/step)) : 0);
+ if (step == 0) {
+ return 0;
+ }
+ len = 1 + ((end-start)/step);
return (len < 0) ? -1 : len;
}
@@ -233,7 +235,7 @@ assignNumber(int useDoubles, Tcl_WideInt *intNumberPtr, double *dblNumberPtr, Tc
} *number;
int tcl_number_type;
- if (TclGetNumberFromObj(NULL, numberObj, (ClientData*)&number, &tcl_number_type) != TCL_OK) {
+ if (TclGetNumberFromObj(NULL, numberObj, (void **)&number, &tcl_number_type) != TCL_OK) {
return;
}
if (useDoubles) {
@@ -818,7 +820,7 @@ TclArithSeriesGetElements(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *objPtr, /* AbstractList object for which an element
* array is to be returned. */
- int *objcPtr, /* Where to store the count of objects
+ ListSizeT *objcPtr, /* Where to store the count of objects
* referenced by objv. */
Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of
* pointers to the list's objects. */