diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-11 14:26:34 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-11 14:26:34 +0100 |
commit | 448923a2d401f3e21eb586f50c1ca9e2dd6259d9 (patch) | |
tree | 8d58460936c03f7743926019f132399dcf9b07ae /src/input/input_plugin.h | |
parent | e2a10c5fdaed1f45040fb3d737ab79f0e5d774d9 (diff) | |
download | xine-lib-448923a2d401f3e21eb586f50c1ca9e2dd6259d9.tar.gz xine-lib-448923a2d401f3e21eb586f50c1ca9e2dd6259d9.tar.bz2 |
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).
Diffstat (limited to 'src/input/input_plugin.h')
-rw-r--r-- | src/input/input_plugin.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 { /* |