summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-24 13:19:38 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-24 13:19:38 -0500
commita8181915a4aac7a37bdd62705e2eac1067eb1904 (patch)
tree4e90ce29b5fad0d34f268e5ac9d247c3ef034a3f /libdimension/dimension
parentbabba43cd4d1b9c92a569f19acbe17e429193b01 (diff)
downloaddimension-a8181915a4aac7a37bdd62705e2eac1067eb1904.tar.xz
Use macros to initialize refcounts.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/refcount.h6
1 files changed, 3 insertions, 3 deletions
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)