emacs-devel
[Top][All Lists]
Advanced

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

Re: Willing to debug bug #3542 (23.0.94; File access via UNC path slow a


From: Haojun Bao
Subject: Re: Willing to debug bug #3542 (23.0.94; File access via UNC path slow again under Windows)
Date: Tue, 14 Jul 2009 12:31:31 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (cygwin)

Eli Zaretskii <...> writes:

>> From: Stefan Monnier <address@hidden>
>> Cc: Andreas Schwab <address@hidden>,  address@hidden
>> Date: Mon, 13 Jul 2009 20:54:14 -0400
>> 
>> > Aha.  But it sounds like it's not just me who is confused.  Here's
>> > just two examples:
>> 
>> >   From doc.c:
>> 
>> >       strp = SDATA (string);
>> >       while (strp < SDATA (string) + SBYTES (string))
>> 
>> >   (why not "while *strp"?)
>> 
>> As said Andreas, this would stop at the first NUL, which may appear
>> within the string.
>
> But then a gazillion other places are buggy: we _do_ use SDATA(str) as
> a C string, and pass it to functions that will stop examining the
> string on the first null.  A random example:
>
>   d = opendir (SDATA (Fdirectory_file_name (encoded_dir)));
>
> What am I missing?

NUL can not be in a pathname, so it should be safe here to treat it as a
classical C string.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]