diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-12-24 13:19:38 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-12-24 13:19:38 -0500 |
commit | a8181915a4aac7a37bdd62705e2eac1067eb1904 (patch) | |
tree | 4e90ce29b5fad0d34f268e5ac9d247c3ef034a3f /libdimension/dimension | |
parent | babba43cd4d1b9c92a569f19acbe17e429193b01 (diff) | |
download | dimension-a8181915a4aac7a37bdd62705e2eac1067eb1904.tar.xz |
Use macros to initialize refcounts.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/refcount.h | 6 |
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) |