]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
assistance defines for classes that are both refcounted and cbdata'd
authorrobertc <>
Fri, 13 Dec 2002 10:43:37 +0000 (10:43 +0000)
committerrobertc <>
Fri, 13 Dec 2002 10:43:37 +0000 (10:43 +0000)
src/defines.h

index 2c3490c4b4d1eafef5a7ff72b598d9a13470ea6a..c7ed12613b8fc354477beecd9d021ba42d98071f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: defines.h,v 1.109 2002/10/13 20:35:00 robertc Exp $
+ * $Id: defines.h,v 1.110 2002/12/13 03:43:37 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
 #endif
 #define cbdataReference(var)   (cbdataInternalLock(var), var)
 #define cbdataReferenceDone(var) do {if (var) {cbdataInternalUnlock(var); var = NULL;}} while(0)
+#define CBDATA_CLASS(type)     static cbdata_type CBDATA_##type
+#define CBDATA_CLASS_INIT(type) cbdata_type type::CBDATA_##type = CBDATA_UNKNOWN
 #define CBDATA_TYPE(type)      static cbdata_type CBDATA_##type = CBDATA_UNKNOWN
 #define CBDATA_GLOBAL_TYPE(type)       cbdata_type CBDATA_##type
 #define CBDATA_INIT_TYPE(type) (CBDATA_##type ?  CBDATA_UNKNOWN : (CBDATA_##type = cbdataInternalAddType(CBDATA_##type, #type, sizeof(type), NULL)))