List Archive


Thread Index


From: Andreas Falkenhahn <>
To: Dieter Baron <>
Subject: Re: Progress callbacks - no userdata pointer?
Date: Fri, 10 Nov 2017 15:43:06 +0100

On 10.11.2017 at 09:29 Dieter Baron wrote:

>> On 09.11.2017, at 17:52 , Andreas Falkenhahn 
>> <> wrote:

>> Is it true that progress callbacks in libzip don't provide any userdata
>> mechanism or am I missing something here? 

>> I see that progress' callbacks are defined like this

>>     typedef void (*zip_progress_callback_t)(double);

>> But this doesn't allow me to pass any userdata to the callback which
>> forces me to use global variables to access certain data from the
>> callback but that is rather ugly…

> Use zip_register_progress_callback_with_state (which we forgot to
> write a man page for; just look at the header file for now).

Thanks, that's what I was looking for.

Best regards,
 Andreas Falkenhahn                   

Made by MHonArc.