From 448923a2d401f3e21eb586f50c1ca9e2dd6259d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 11 Dec 2007 14:26:34 +0100 Subject: Define free() as the default dispose function for plugin classes. Most plugin classes in xine define a dispose function simply to call free(), but free() is ABI-compatible with our dispose functions, so add a macro that allows to pass free() directly as dispose function. It's an opt-in so that no extra conditional is needed, and plugin authors won't forget about providing a dispose function (if they need to). --- src/input/input_plugin.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/input') diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index 95df4be97..2917721c9 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.h @@ -90,6 +90,8 @@ struct input_class_s { int (*eject_media) (input_class_t *this); }; +#define default_input_class_dispose (void (*) (input_class_t *this))free + struct input_plugin_s { /* -- cgit v1.2.3