r2253 - trunk/varnish-cache/include
des at projects.linpro.no
des at projects.linpro.no
Thu Nov 15 16:07:16 CET 2007
Author: des
Date: 2007-11-15 16:07:15 +0100 (Thu, 15 Nov 2007)
New Revision: 2253
Modified:
trunk/varnish-cache/include/miniobj.h
Log:
Add a VALID_OBJ() predicate macro.
Modified: trunk/varnish-cache/include/miniobj.h
===================================================================
--- trunk/varnish-cache/include/miniobj.h 2007-11-15 14:18:39 UTC (rev 2252)
+++ trunk/varnish-cache/include/miniobj.h 2007-11-15 15:07:15 UTC (rev 2253)
@@ -12,6 +12,9 @@
free(to); \
} while (0)
+#define VALID_OBJ(ptr, type_magic) \
+ ((ptr) != NULL && (ptr)->magic == (type_magic))
+
#define CHECK_OBJ(ptr, type_magic) \
do { \
assert((ptr)->magic == type_magic); \
More information about the varnish-commit
mailing list