[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-dev
Subject: RE: svn commit: r1544715 - /subversion/trunk/subversion/libsvn_subr/io.c
From: "Bert Huijben" <bert () qqmail ! nl>
Date: 2013-11-23 12:24:05
Message-ID: 307901cee846$e749eee0$b5ddcca0$ () qqmail ! nl
[Download RAW message or body]
This is a multipart message in MIME format.
Ok, reviewed apr's usage of these two variables.
Using fname is the better case on all platforms. name is only set on the CP/M based \
platforms, not on the posix platforms.
Bert
From: Bert Huijben [mailto:bert@qqmail.nl]
Sent: zaterdag 23 november 2013 13:00
To: dev@subversion.apache.org; commits@subversion.apache.org
Subject: RE: svn commit: r1544715 - /subversion/trunk/subversion/libsvn_subr/io.c
Strange I debugged this on Windows and I'm sure it worked there. On which platform \
was it broken and does it still work on Windows?
Bert
_____
From: stefan2@apache.org <mailto:stefan2@apache.org>
Sent: 23-11-2013 01:04
To: commits@subversion.apache.org <mailto:commits@subversion.apache.org>
Subject: svn commit: r1544715 - /subversion/trunk/subversion/libsvn_subr/io.c
Author: stefan2
Date: Sat Nov 23 00:03:54 2013
New Revision: 1544715
URL: http://svn.apache.org/r1544715
Log:
Make the stringbuf_from_aprfile() quickpath actually kick in.
* subversion/libsvn_subr/io.c
(stringbuf_from_aprfile): APR does not set the name but the fname field
Modified:
subversion/trunk/subversion/libsvn_subr/io.c
Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1544715 \
<http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1544715&r1=1544714&r2=1544715&view=diff> \
&r1=1544714&r2=1544715&view=diff \
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Sat Nov 23 00:03:54 2013
@@ -2307,12 +2307,11 @@ stringbuf_from_aprfile(svn_stringbuf_t *
efficient memory handling, we'll try to do so. */
if (check_size)
{
- apr_finfo_t finfo;
+ apr_finfo_t finfo = { 0 };
/* In some cases we get size 0 and no error for non files,
so we also check for the name. (= cached in apr_file_t) */
- if (! apr_file_info_get(&finfo, APR_FINFO_SIZE | APR_FINFO_NAME, file)
- && finfo.name != NULL)
+ if (! apr_file_info_get(&finfo, APR_FINFO_SIZE, file) && finfo.fname)
{
/* we've got the file length. Now, read it in one go. */
svn_boolean_t eof;
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 \
(filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* \
{behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ok, \
reviewed apr's usage of these two variables.<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Using fname \
is the better case on all platforms. name is only set on the CP/M based platforms, \
not on the posix platforms.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> \
Bert<o:p></o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></a></p><div \
style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> Bert Huijben \
[mailto:bert@qqmail.nl] <br><b>Sent:</b> zaterdag 23 november 2013 \
13:00<br><b>To:</b> dev@subversion.apache.org; \
commits@subversion.apache.org<br><b>Subject:</b> RE: svn commit: r1544715 - \
/subversion/trunk/subversion/libsvn_subr/io.c<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Strange I debugged this \
on Windows and I'm sure it worked there. On which platform was it broken and does it \
still work on Windows?<br><br>Bert<o:p></o:p></span></p></div></div><div><div \
class=MsoNormal align=center style='text-align:center'><hr size=2 width="100%" \
align=center></div><p class=MsoNormal style='margin-bottom:12.0pt'><b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From: </span></b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a \
href="mailto:stefan2@apache.org">stefan2@apache.org</a></span><br><b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Sent: </span></b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>23-11-2013 \
01:04</span><br><b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>To: </span></b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><a \
href="mailto:commits@subversion.apache.org">commits@subversion.apache.org</a></span><br><b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Subject: </span></b><span \
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>svn commit: r1544715 - \
/subversion/trunk/subversion/libsvn_subr/io.c</span><o:p></o:p></p></div><p \
class=MsoNormal style='margin-bottom:12.0pt'>Author: stefan2<br>Date: Sat Nov 23 \
00:03:54 2013<br>New Revision: 1544715<br><br>URL: <a \
href="http://svn.apache.org/r1544715">http://svn.apache.org/r1544715</a><br>Log:<br>Make \
the stringbuf_from_aprfile() quickpath actually kick in.<br><br>* \
subversion/libsvn_subr/io.c<br> (stringbuf_from_aprfile): APR does not set the \
name but the fname field<br><br>Modified:<br> \
subversion/trunk/subversion/libsvn_subr/io.c<br><br>Modified: \
subversion/trunk/subversion/libsvn_subr/io.c<br>URL: <a \
href="http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=15 \
44715&r1=1544714&r2=1544715&view=diff">http://svn.apache.org/viewvc/subver \
sion/trunk/subversion/libsvn_subr/io.c?rev=1544715&r1=1544714&r2=1544715&v \
iew=diff</a><br>==============================================================================<br>--- \
subversion/trunk/subversion/libsvn_subr/io.c (original)<br>+++ \
subversion/trunk/subversion/libsvn_subr/io.c Sat Nov 23 00:03:54 2013<br>@@ -2307,12 \
+2307,11 @@ stringbuf_from_aprfile(svn_stringbuf_t \
*<br> efficient memory handling, we'll try to do so. \
*/<br> if (check_size)<br> \
{<br>- apr_finfo_t \
finfo;<br>+ apr_finfo_t finfo = { 0 \
};<br><br> /* In some cases we get size 0 and no \
error for non files,<br> \
so we also check for the name. (= cached in apr_file_t) \
*/<br>- if (! apr_file_info_get(&finfo, \
APR_FINFO_SIZE | APR_FINFO_NAME, \
file)<br>- && \
finfo.name != NULL)<br>+ if (! \
apr_file_info_get(&finfo, APR_FINFO_SIZE, file) && \
finfo.fname)<br> \
{<br> /* we've got the \
file length. Now, read it in one go. \
*/<br> svn_boolean_t \
eof;<br><br><o:p></o:p></p></div></div></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic