Fix incompatible log callback in liblrzip

This commit is contained in:
Con Kolivas 2015-03-10 20:27:38 +11:00
parent 3dbf13f92d
commit d5a339335b
3 changed files with 6 additions and 5 deletions

View file

@ -128,10 +128,11 @@ typedef void (*Lrzip_Info_Cb)(void *data, int pct, int chunk_pct);
* @param level The Lrzip_Log_Level of the message
* @param line The line in LRZIP code where the message originated
* @param file The file in LRZIP code where the message originated
* @param func The function in LRZIP code where the message originated
* @param format The printf-style format of the message
* @param args The matching va_list for @p format
*/
typedef void (*Lrzip_Log_Cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *format, va_list args);
typedef void (*Lrzip_Log_Cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list args);
/**
* @typedef Lrzip_Password_Cb
* @brief The callback to call for operations requiring a password

View file

@ -598,7 +598,7 @@ void lrzip_log_cb_set(Lrzip *lr, Lrzip_Log_Cb cb, void *log_data)
{
if (!lr)
return;
lr->control->log_cb = (void*)cb;
lr->control->log_cb = cb;
lr->control->log_data = log_data;
}
@ -634,7 +634,7 @@ void lrzip_pass_cb_set(Lrzip *lr, Lrzip_Password_Cb cb, void *data)
{
if (!lr)
return;
lr->control->pass_cb = (void*)cb;
lr->control->pass_cb = cb;
lr->control->pass_data = data;
}
@ -642,7 +642,7 @@ void lrzip_info_cb_set(Lrzip *lr, Lrzip_Info_Cb cb, void *data)
{
if (!lr)
return;
lr->control->info_cb = (void*)cb;
lr->control->info_cb = cb;
lr->control->info_data = data;
}

View file

@ -441,7 +441,7 @@ struct rzip_control {
int log_level;
void (*info_cb)(void *data, int pct, int chunk_pct);
void *info_data;
void (*log_cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list);
void (*log_cb)(void *data, unsigned int level, unsigned int line, const char *file, const char *func, const char *format, va_list args);
void *log_data;
char chunk_bytes;