diff options
Diffstat (limited to 'libdimension/light.c')
-rw-r--r-- | libdimension/light.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/libdimension/light.c b/libdimension/light.c index daabe6f..b1d2108 100644 --- a/libdimension/light.c +++ b/libdimension/light.c @@ -26,17 +26,11 @@ #include "dimension-internal.h" #include <stdlib.h> -static void -dmnsn_default_light_free_fn(dmnsn_light *light) -{ - dmnsn_free(light); -} - /* Allocate a new dummy light */ dmnsn_light * -dmnsn_new_light(void) +dmnsn_new_light(dmnsn_pool *pool) { - dmnsn_light *light = DMNSN_MALLOC(dmnsn_light); + dmnsn_light *light = DMNSN_PALLOC(pool, dmnsn_light); dmnsn_init_light(light); return light; } @@ -48,15 +42,4 @@ dmnsn_init_light(dmnsn_light *light) light->direction_fn = NULL; light->illumination_fn = NULL; light->shadow_fn = NULL; - light->free_fn = dmnsn_default_light_free_fn; - DMNSN_REFCOUNT_INIT(light); -} - -/* Free a dummy light */ -void -dmnsn_delete_light(dmnsn_light *light) -{ - if (DMNSN_DECREF(light)) { - light->free_fn(light); - } } |