Re: [Nautilus-list] continued redhat merge



on 9/17/01 10:06 AM, Alex Larsson at alexl redhat com wrote:

>> We probably also want to add a maximum size parameter to
>> eel_read_entire_file because it's probably never a good idea to read a whole
>> file into a buffer in memory without any bound on how much data you are
>> going to read. Or rather, we want to add a newly named function to avoid
>> incompatibility with older nautilus and newer eel. On HEAD we can have only
>> the single function with the maximum file size. Also, we can change it so
>> that it always puts a '\0' after the file at the same time, since that hurts
>> nothing and helps in this case.
> 
> Ok. I will backport the new one and call it
> eel_read_entire_file_with_limit() or something.

I'd suggest that there still only be one function that does the reading. In
the gnome 1 version of eel, eel_read_entire_file should just call
eel_read_entire_file_with_limit with some hard-coded reasonable limit. It
will only ever be used by old versions of Nautilus with new versions of eel,
so it's not important to get it just right.

I also realized that the async. version also needs a limit, on HEAD at
least, for the same reason.

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]