On Thu, Jun 19, 2008 at 9:13 AM, Brett Nash <[EMAIL PROTECTED]> wrote:
> On Wed, 18 Jun 2008 14:44:05 -0300
> "Gustavo Sverzut Barbieri" <[EMAIL PROTECTED]> wrote:
>
>> On Wed, Jun 18, 2008 at 1:53 PM, Cedric BAIL <[EMAIL PROTECTED]>
>> wrote:
>> > Hi,
>> >
>> >  Here is a patch that add support for background preloading of a
>> > data image. You can now, if you know what you do, ask evas to load
>> > the data of an image in memory before it is displayed (look at the
>> > sample code for expedite).
>> >
>> >  The code is quite simple, we have now a work queue where we add all
>> > the Image_Entry we need to preload. They are processed one after the
>> > other in another thread. When it's done, it notify evas main thread
>> > with evas async API and work on the next Image_Entry.
>> >
>> >  This means that we now require that engine surface creation and
>> > loader should be thread safe. It's currently the case for all the
>> > engine I know something about, so this should not break anything.
>> > Anyway this code is optionnal and could be completely unactivated
>> > in a per engine basis or globally.
>> >
>> > As always have fun reviewing this patch.
>>
>> so here it goes:
>>
>> configure.in: $build_async_preload should depend on async_events, no?
>>
>>
>> -   EAPI Evas_Bool      evas_async_events_put             (void
>> *target, Evas_Callback_Type type, void *event_info, void (*func)(void
>> *target, Evas_Callback_Type type, void *event_info));
>> +   EAPI Evas_Bool      evas_async_events_put             (const
>> void *target, Evas_Callback_Type type, void *event_info, void
>> (*func)(void *target, Evas_Callback_Type type, void *event_info));
>>
>> you made target const, but not in the callback... this is strange.
>>
>
> Not at all, in fact it is correct.  Any other combination requires an
> undefined cast to or from a const char *.
>
> An example from the C standard library:
> char *strstr(const char *haystack, const char *needle);
>
> If target is not a const char *, when it is passed back in the function
> to claim it is incorrect.  The const on the _put call indicates that
> function won't modify it, but it should not promote the return/callback
> type to a const.

Replying to both you and Cedric: I know it is used elsewhere and even
inside EFL, I just want to know why we need it in this case. But
cedric seems to say he needs it, so fine.


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to