Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 2018 20:18:46 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Oliver Pinter <oliver.pinter@hardenedbsd.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r329649 - head/stand/liblua
Message-ID:  <CACNAnaFKUgGj5V2WoNy_cckcL2D7v1bh%2BpCVC6RgJ6htuzr8Rg@mail.gmail.com>
In-Reply-To: <CAPQ4fftdDb8z8O5ZBPGveV5PPp6m5NNpUODDUstRQPZPkpp4UA@mail.gmail.com>
References:  <201802201821.w1KILUUg079715@repo.freebsd.org> <CAPQ4fftdDb8z8O5ZBPGveV5PPp6m5NNpUODDUstRQPZPkpp4UA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 20, 2018 at 2:48 PM, Oliver Pinter
<oliver.pinter@hardenedbsd.org> wrote:
> On Tuesday, February 20, 2018, Conrad Meyer <cem@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaFKUgGj5V2WoNy_cckcL2D7v1bh%2BpCVC6RgJ6htuzr8Rg>