]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make some cbdata function args const
authorwessels <>
Sat, 3 Jan 1998 06:41:02 +0000 (06:41 +0000)
committerwessels <>
Sat, 3 Jan 1998 06:41:02 +0000 (06:41 +0000)
src/cbdata.cc
src/protos.h

index 7ddf5bc784b82ac443e4a1556b4ecd66e6fc8e14..b31ebaf7b5f38f972d246e05bb20b544d25d3489 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: cbdata.cc,v 1.11 1997/12/02 00:17:31 wessels Exp $
+ * $Id: cbdata.cc,v 1.12 1998/01/02 23:41:02 wessels Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -68,7 +68,7 @@ static hash_table *htable = NULL;
 static int cbdataCount = 0;
 
 typedef struct _cbdata {
-    void *key;
+    const void *key;
     struct _cbdata *next;
     int valid;
     int locks;
@@ -103,9 +103,9 @@ cbdataInit(void)
 
 void
 #if CBDATA_DEBUG
-cbdataAddDbg(void *p, const char *file, int line)
+cbdataAddDbg(const void *p, const char *file, int line)
 #else
-cbdataAdd(void *p)
+cbdataAdd(const void *p)
 #endif
 {
     cbdata *c;
@@ -145,7 +145,7 @@ cbdataFree(void *p)
 }
 
 void
-cbdataLock(void *p)
+cbdataLock(const void *p)
 {
     cbdata *c;
     if (p == NULL)
@@ -157,7 +157,7 @@ cbdataLock(void *p)
 }
 
 void
-cbdataUnlock(void *p)
+cbdataUnlock(const void *p)
 {
     cbdata *c;
     if (p == NULL)
@@ -173,11 +173,11 @@ cbdataUnlock(void *p)
     cbdataCount--;
     xfree(c);
     debug(45, 3) ("cbdataUnlock: Freeing %p\n", p);
-    xfree(p);
+    xfree((void *)p);
 }
 
 int
-cbdataValid(void *p)
+cbdataValid(const void *p)
 {
     cbdata *c;
     if (p == NULL)
index 265f43aefe7351211497164b996caf68782db821..80d363d37b2170140baf9bbb076cb167975386a9 100644 (file)
@@ -55,14 +55,14 @@ extern void configFreeMemory(void);
 
 extern void cbdataInit(void);
 #if CBDATA_DEBUG
-extern void cbdataAddDbg(void *p, const char *, int);
+extern void cbdataAddDbg(const void *p, const char *, int);
 #else
-extern void cbdataAdd(void *p);
+extern void cbdataAdd(const void *p);
 #endif
 extern void cbdataFree(void *p);
-extern void cbdataLock(void *p);
-extern void cbdataUnlock(void *p);
-extern int cbdataValid(void *p);
+extern void cbdataLock(const void *p);
+extern void cbdataUnlock(const void *p);
+extern int cbdataValid(const void *p);
 extern void cbdataDump(StoreEntry *);
 
 extern void clientdbInit(void);