summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-27 14:05:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-27 14:06:14 -0400
commitd96168d4659f5e5cd2f71994a94b6aeafd62e11e (patch)
tree5b77ecb7c8ff11f8615286289425f480362f80a1
parentb70fa29511471e8a85f9b8c3e8947dbb3c21dedb (diff)
downloaddimension-d96168d4659f5e5cd2f71994a94b6aeafd62e11e.tar.xz
interior: Kill ->ptr field.
-rw-r--r--libdimension/dimension/interior.h9
-rw-r--r--libdimension/interior.c6
2 files changed, 5 insertions, 10 deletions
diff --git a/libdimension/dimension/interior.h b/libdimension/dimension/interior.h
index 691b053..69d3ebf 100644
--- a/libdimension/dimension/interior.h
+++ b/libdimension/dimension/interior.h
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2010-2011 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2010-2014 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Library. *
* *
@@ -25,10 +25,9 @@
/** An interior. */
typedef struct dmnsn_interior {
- double ior; /**< Refractive index. */
- dmnsn_free_fn *free_fn; /**< Destructor callback. */
- void *ptr; /**< Generic pointer. */
- DMNSN_REFCOUNT; /**< Reference count. */
+ double ior; /**< Refractive index. */
+
+ DMNSN_REFCOUNT; /**< Reference count. */
} dmnsn_interior;
/**
diff --git a/libdimension/interior.c b/libdimension/interior.c
index 791d31a..7d7af85 100644
--- a/libdimension/interior.c
+++ b/libdimension/interior.c
@@ -31,8 +31,7 @@ dmnsn_interior *
dmnsn_new_interior(void)
{
dmnsn_interior *interior = DMNSN_MALLOC(dmnsn_interior);
- interior->ior = 1.0;
- interior->free_fn = NULL;
+ interior->ior = 1.0;
DMNSN_REFCOUNT_INIT(interior);
return interior;
}
@@ -42,9 +41,6 @@ void
dmnsn_delete_interior(dmnsn_interior *interior)
{
if (DMNSN_DECREF(interior)) {
- if (interior->free_fn) {
- interior->free_fn(interior->ptr);
- }
dmnsn_free(interior);
}
}