diff options
author | Grigori Goronzy <greg@blackbox> | 2009-07-26 16:03:37 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-07-26 16:03:37 +0200 |
commit | f21c5b6b2788d1ba2073cb4066eedee0de1b249e (patch) | |
tree | 027a48eea625849f03c4756f770ad101b8a080a7 /libass/ass_library.c | |
parent | 311ec23031e257a8edde5153b09a5d0c2d6b0f6b (diff) | |
download | libass-f21c5b6b2788d1ba2073cb4066eedee0de1b249e.tar.bz2 libass-f21c5b6b2788d1ba2073cb4066eedee0de1b249e.tar.xz |
Improve message callback API
Instead of passing a pointer to a va_list, pass the va_list itself.
Additionally, use const char for the format string and use names in
the prototype that describe the arguments' meaning.
Diffstat (limited to 'libass/ass_library.c')
-rw-r--r-- | libass/ass_library.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libass/ass_library.c b/libass/ass_library.c index f464af7..3481b6f 100644 --- a/libass/ass_library.c +++ b/libass/ass_library.c @@ -28,12 +28,12 @@ #include "ass_library.h" #include "ass_utils.h" -static void ass_msg_handler(int level, char *fmt, va_list *va, void *data) +static void ass_msg_handler(int level, const char *fmt, va_list va, void *data) { if (level > MSGL_INFO) return; fprintf(stderr, "[ass] "); - vfprintf(stderr, fmt, *va); + vfprintf(stderr, fmt, va); fprintf(stderr, "\n"); } @@ -137,7 +137,7 @@ void ass_clear_fonts(ass_library_t *priv) * \param data additional data that will be passed to the callback */ void ass_set_message_cb(ass_library_t *priv, - void (*msg_cb)(int, char *, va_list *, void *), + void (*msg_cb)(int, const char *, va_list, void *), void *data) { if (msg_cb) { @@ -145,4 +145,3 @@ void ass_set_message_cb(ass_library_t *priv, priv->msg_callback_data = data; } } - |