svn commit: r329649 - head/stand/liblua

Kyle Evans kevans at freebsd.org
Wed Feb 21 02:19:16 UTC 2018


On Tue, Feb 20, 2018 at 2:48 PM, Oliver Pinter
<oliver.pinter at hardenedbsd.org> wrote:
> On Tuesday, February 20, 2018, Conrad Meyer <cem at freebsd.org> wrote:
>
>> Author: cem
>> Date: Tue Feb 20 18:21:30 2018
>> New Revision: 329649
>> URL: https://svnweb.freebsd.org/changeset/base/329649
>>
>> Log:
>>   Lua lfs.attributes: Provide a more consistent error return
>>
>>   In the remaining error case, return a 3-tuple consistent with the other
>>   error return case.
>>
>>   Document how to invoke lfs.attributes() and detect/decode error return in
>>   example comments.
>>
>>   Reviewed by:  kevans
>>   Sponsored by: Dell EMC Isilon
>>   Differential Revision:        https://reviews.freebsd.org/D14451
>>
>> Modified:
>>   head/stand/liblua/lfs.c
>>
>> Modified: head/stand/liblua/lfs.c
>> ============================================================
>> ==================
>> --- head/stand/liblua/lfs.c     Tue Feb 20 18:12:07 2018        (r329648)
>> +++ head/stand/liblua/lfs.c     Tue Feb 20 18:21:30 2018        (r329649)
>> @@ -80,13 +80,20 @@ __FBSDID("$FreeBSD$");
>>   * (etc.)
>>   *
>>   * The other available API is lfs.attributes(), which functions somewhat
>> like
>> - * stat(2) and returns a table of values:
>> + * stat(2) and returns a table of values.  Example code:
>>   *
>> - *     for k, v in pairs(lfs.attributes("/boot")) do
>> + *     attrs, errormsg, errorcode = lfs.attributes("/boot")
>> + *     if attrs == nil then
>> + *         print(errormsg)
>> + *         return errorcode
>> + *     end
>> + *
>> + *     for k, v in pairs(attrs) do
>>   *         print(k .. ":\t" .. v)
>>   *     end
>> + *     return 0
>
>
> Hi!
>
> Missing  ; at the end of lines here.

Hi,

Thanks for pointing that out! =) Just FYI, our semicolon termination
policy was pretty unnatural for Lua, so we've dropped it as of r329686
and all other instances of trailing semicolons should have been axed
as of r329684.

Thanks,

Kyle Evans


More information about the svn-src-head mailing list