]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Hack to allow safe_free to be called on const pointers.
authorhno <>
Fri, 29 Jun 2001 20:48:06 +0000 (20:48 +0000)
committerhno <>
Fri, 29 Jun 2001 20:48:06 +0000 (20:48 +0000)
include/util.h
lib/util.c
src/structs.h

index c76386a4d2f957c983eb9c5f5b87b5bc5e159dbe..65fd3013081bc09f657caa48433e2dd66eb0731c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.59 2001/02/07 18:56:50 hno Exp $
+ * $Id: util.h,v 1.60 2001/06/29 14:48:07 hno Exp $
  *
  * AUTHOR: Harvest Derived
  *
@@ -80,7 +80,7 @@ extern void *xmalloc(size_t);
 extern void *xrealloc(void *, size_t);
 extern void Tolower(char *);
 extern void xfree(void *);
-extern void xxfree(void *);
+extern void xxfree(const void *);
 
 /* rfc1738.c */
 extern char *rfc1738_escape(const char *);
index 7f2633c3b3ab58177fe2da36f258f2c94307404c..abc6b6fd136640f0df8f9952310b201424d4a42a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.78 2001/04/10 17:00:50 hno Exp $
+ * $Id: util.c,v 1.79 2001/06/29 14:48:06 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -487,8 +487,9 @@ xfree(void *s)
 
 /* xxfree() - like xfree(), but we already know s != NULL */
 void
-xxfree(void *s)
+xxfree(const void *s_const)
 {
+    void *s = (void *)s_const;
 #if XMALLOC_TRACE
     xmalloc_show_trace(s, -1);
 #endif
index 775436f0e0c0fbdbfa3b8ec5b352d63cb5c5d846..675cd6d5598d31f4e5d87d800654939089a736a7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.391 2001/06/29 14:37:51 hno Exp $
+ * $Id: structs.h,v 1.392 2001/06/29 14:48:06 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -1455,7 +1455,7 @@ struct _MemObject {
 #if URL_CHECKSUM_DEBUG
     unsigned int chksum;
 #endif
-    char *vary_headers;
+    const char *vary_headers;
 };
 
 struct _StoreEntry {
@@ -1608,7 +1608,7 @@ struct _request_t {
     err_type err_type;
     char *peer_login;          /* Configured peer login:password */
     time_t lastmod;            /* Used on refreshes */
-    char *vary_headers;                /* Used when varying entities are detected. Changes how the store key is calculated */
+    const char *vary_headers;  /* Used when varying entities are detected. Changes how the store key is calculated */
 };
 
 struct _cachemgr_passwd {