From d96168d4659f5e5cd2f71994a94b6aeafd62e11e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 27 May 2014 14:05:45 -0400 Subject: interior: Kill ->ptr field. --- libdimension/dimension/interior.h | 9 ++++----- libdimension/interior.c | 6 +----- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'libdimension') 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 * + * Copyright (C) 2010-2014 Tavian Barnes * * * * 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); } } -- cgit v1.2.3