summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-12 15:06:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-12 15:06:47 (GMT)
commit0da519374fd5eda8bb87a127abdefffdffb33b0a (patch)
treeed891ab3e00ea5888426f25d675aff2d89a00b1d /generic/tclScan.c
parent49da32e6e4e84c1e3ca79b7fa03f4ee0b78728dd (diff)
downloadtcl-0da519374fd5eda8bb87a127abdefffdffb33b0a.zip
tcl-0da519374fd5eda8bb87a127abdefffdffb33b0a.tar.gz
tcl-0da519374fd5eda8bb87a127abdefffdffb33b0a.tar.bz2
Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts in
rest of Tcl source code. No ABI change. API change *should* be harmless.
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r--generic/tclScan.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 0051415..c862be4 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -101,10 +101,9 @@ BuildCharSet(
end += Tcl_UtfToUniChar(end, &ch);
}
- cset->chars = (Tcl_UniChar *)
- ckalloc(sizeof(Tcl_UniChar) * (end - format - 1));
+ cset->chars = ckalloc(sizeof(Tcl_UniChar) * (end - format - 1));
if (nranges > 0) {
- cset->ranges = (struct Range *) ckalloc(sizeof(struct Range)*nranges);
+ cset->ranges = ckalloc(sizeof(struct Range) * nranges);
} else {
cset->ranges = NULL;
}
@@ -224,9 +223,9 @@ static void
ReleaseCharSet(
CharSet *cset)
{
- ckfree((char *)cset->chars);
+ ckfree(cset->chars);
if (cset->ranges) {
- ckfree((char *)cset->ranges);
+ ckfree(cset->ranges);
}
}
@@ -590,7 +589,7 @@ Tcl_ScanObjCmd(
*/
if (totalVars > 0) {
- objs = (Tcl_Obj **) ckalloc(sizeof(Tcl_Obj *) * totalVars);
+ objs = ckalloc(sizeof(Tcl_Obj *) * totalVars);
for (i = 0; i < totalVars; i++) {
objs[i] = NULL;
}
@@ -1020,7 +1019,7 @@ Tcl_ScanObjCmd(
}
}
if (objs != NULL) {
- ckfree((char *) objs);
+ ckfree(objs);
}
if (code == TCL_OK) {
if (underflow && (nconversions == 0)) {