From a8181915a4aac7a37bdd62705e2eac1067eb1904 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 24 Dec 2011 13:19:38 -0500 Subject: Use macros to initialize refcounts. --- libdimension/dimension/refcount.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libdimension/dimension') diff --git a/libdimension/dimension/refcount.h b/libdimension/dimension/refcount.h index 9f6d8b0..f94815c 100644 --- a/libdimension/dimension/refcount.h +++ b/libdimension/dimension/refcount.h @@ -24,10 +24,10 @@ */ /** @internal The name of the reference count field in all structs. */ -#define DMNSN_REFCOUNT_NAME refcount +#define DMNSN_REFCOUNT_FIELD refcount /** @internal Declare a reference count field in a struct. */ -#define DMNSN_REFCOUNT unsigned int DMNSN_REFCOUNT_NAME +#define DMNSN_REFCOUNT unsigned int DMNSN_REFCOUNT_FIELD /** * Increment a reference count. @@ -38,6 +38,6 @@ /* Suppress "address will always evaluate to true" warning */ \ void *testptr = (object); \ if (testptr) { \ - ++(object)->DMNSN_REFCOUNT_NAME; \ + ++(object)->DMNSN_REFCOUNT_FIELD; \ } \ } while (0) -- cgit v1.2.3