--------------------- PatchSet 384 Date: 2002/12/14 21:25:28 Author: rbcollins Branch: unify-io Tag: (none) Log: state is now strongly typed Members: src/SwapDir.h:1.1.2.32->1.1.2.33 src/ufscommon.cc:1.4.10.35->1.4.10.36 src/fs/coss/store_dir_coss.cc:1.4.10.29->1.4.10.30 Index: squid3/src/SwapDir.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.h,v retrieving revision 1.1.2.32 retrieving revision 1.1.2.33 diff -u -r1.1.2.32 -r1.1.2.33 --- squid3/src/SwapDir.h 14 Dec 2002 21:04:14 -0000 1.1.2.32 +++ squid3/src/SwapDir.h 14 Dec 2002 21:25:28 -0000 1.1.2.33 @@ -1,6 +1,6 @@ /* - * $Id: SwapDir.h,v 1.1.2.32 2002/12/14 21:04:14 rbcollins Exp $ + * $Id: SwapDir.h,v 1.1.2.33 2002/12/14 21:25:28 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -89,7 +89,7 @@ struct { STLOGCLEANNEXTENTRY *nextentry; STLOGCLEANWRITE *write; - void *state; + CleanLog *state; } clean; int writes_since_clean; } log; Index: squid3/src/ufscommon.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ufscommon.cc,v retrieving revision 1.4.10.35 retrieving revision 1.4.10.36 diff -u -r1.4.10.35 -r1.4.10.36 --- squid3/src/ufscommon.cc 14 Dec 2002 21:14:49 -0000 1.4.10.35 +++ squid3/src/ufscommon.cc 14 Dec 2002 21:25:28 -0000 1.4.10.36 @@ -1,5 +1,5 @@ /* - * $Id: ufscommon.cc,v 1.4.10.35 2002/12/14 21:14:49 rbcollins Exp $ + * $Id: ufscommon.cc,v 1.4.10.36 2002/12/14 21:25:28 rbcollins Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -953,7 +953,7 @@ fchmod(state->fd, sb.st_mode); #endif log.clean.write = commonUfsDirWriteCleanEntry; - log.clean.state = (void *)state; + log.clean.state = state; return 0; } @@ -963,8 +963,7 @@ const StoreEntry * commonUfsDirCleanLogNextEntry(SwapDir * sd) { - UFSCleanLog *state = (UFSCleanLog *)sd->log.clean.state; - return state->nextEntry(); + return sd->log.clean.state->nextEntry(); } const StoreEntry * @@ -982,8 +981,7 @@ void commonUfsDirWriteCleanEntry(SwapDir * sd, const StoreEntry * e) { - UFSCleanLog *state = (UFSCleanLog *)sd->log.clean.state; - state->write (*e); + sd->log.clean.state->write (*e); } void Index: squid3/src/fs/coss/store_dir_coss.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fs/coss/store_dir_coss.cc,v retrieving revision 1.4.10.29 retrieving revision 1.4.10.30 diff -u -r1.4.10.29 -r1.4.10.30 --- squid3/src/fs/coss/store_dir_coss.cc 14 Dec 2002 21:14:50 -0000 1.4.10.29 +++ squid3/src/fs/coss/store_dir_coss.cc 14 Dec 2002 21:25:28 -0000 1.4.10.30 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.4.10.29 2002/12/14 21:14:50 rbcollins Exp $ + * $Id: store_dir_coss.cc,v 1.4.10.30 2002/12/14 21:25:28 rbcollins Exp $ * * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -514,8 +514,7 @@ static const StoreEntry * storeCossDirCleanLogNextEntry(SwapDir * sd) { - CossCleanLog *state = (CossCleanLog *)sd->log.clean.state; - return state->nextEntry(); + return sd->log.clean.state->nextEntry(); } const StoreEntry * @@ -535,9 +534,8 @@ static void storeCossDirWriteCleanEntry(SwapDir * sd, const StoreEntry * e) { - CossCleanLog *state = (CossCleanLog *)sd->log.clean.state; assert (e); - state->write (*e); + sd->log.clean.state->write (*e); } void