]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make new,new[],delete,delete[]
authorrobertc <>
Fri, 17 Jan 2003 11:53:35 +0000 (11:53 +0000)
committerrobertc <>
Fri, 17 Jan 2003 11:53:35 +0000 (11:53 +0000)
include/util.h

index c636ae829a083002ffabf8d737fdd5f320df26ac..0593a27d9f29cb6a1e8bbc7d96a40d9b2ccc4758 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.65 2002/10/25 01:25:26 adrian Exp $
+ * $Id: util.h,v 1.66 2003/01/17 04:53:35 robertc Exp $
  *
  * AUTHOR: Harvest Derived
  *
@@ -81,6 +81,24 @@ SQUIDCEXTERN void *xrealloc(void *, size_t);
 SQUIDCEXTERN void Tolower(char *);
 SQUIDCEXTERN void xfree(void *);
 SQUIDCEXTERN void xxfree(const void *);
+#ifdef __cplusplus
+inline void *operator new(size_t size)
+{
+    return xmalloc(size);
+}
+inline void operator delete (void *address)
+{
+    xfree (address);
+}
+inline void *operator new[] (size_t size)
+{
+    return xmalloc(size);
+}
+inline void operator delete[] (void *address)
+{
+    xfree (address);
+}
+#endif
 
 /* rfc1738.c */
 SQUIDCEXTERN char *rfc1738_escape(const char *);