diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-16 01:16:09 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-16 01:16:09 +0000 |
commit | 8f01c5394dcce8f5d4e7102dacfcdea9d1f7b021 (patch) | |
tree | 4092a281882e34ac53ec15d582dcbf2cb0d408c0 /tests | |
parent | 1928016fe7aa439d4bfb61d3a7e7b7399ca7a229 (diff) | |
download | dimension-8f01c5394dcce8f5d4e7102dacfcdea9d1f7b021.tar.xz |
Add destructor callbacks for polymorphic C types, and use their base
dmnsn_delete_*() function.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/tests.c b/tests/tests.c index 8743119..218fcfd 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -76,7 +76,7 @@ dmnsn_new_default_scene() sphere = dmnsn_new_sphere(); if (!sphere) { - dmnsn_delete_perspective_camera(scene->camera); + dmnsn_delete_camera(scene->camera); dmnsn_delete_canvas(scene->canvas); dmnsn_delete_scene(scene); return NULL; @@ -89,8 +89,8 @@ dmnsn_new_default_scene() cube = dmnsn_new_cube(); if (!cube) { - dmnsn_delete_sphere(sphere); - dmnsn_delete_perspective_camera(scene->camera); + dmnsn_delete_object(sphere); + dmnsn_delete_camera(scene->camera); dmnsn_delete_canvas(scene->canvas); dmnsn_delete_scene(scene); return NULL; @@ -113,9 +113,9 @@ dmnsn_delete_default_scene(dmnsn_scene *scene) dmnsn_array_get(scene->objects, 0, &sphere); dmnsn_array_get(scene->objects, 1, &cube); - dmnsn_delete_cube(cube); - dmnsn_delete_sphere(sphere); - dmnsn_delete_perspective_camera(scene->camera); + dmnsn_delete_object(cube); + dmnsn_delete_object(sphere); + dmnsn_delete_camera(scene->camera); dmnsn_delete_canvas(scene->canvas); dmnsn_delete_scene(scene); } |