<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/lua-github.git/lstrlib.c, branch temporary</title>
<subtitle>github.com: lua/lua.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/'/>
<entry>
<title>Fixed bug in 'string.format("%p")'</title>
<updated>2020-03-16T17:13:13+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-03-16T17:13:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=513559cc4760392b6fa33754c516683ef49dba22'/>
<id>513559cc4760392b6fa33754c516683ef49dba22</id>
<content type='text'>
The string "(null)" used for non-collectable values must be printed as a
string, not as a pointer. (Bug introduced in commit e0cbaa50fa7).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The string "(null)" used for non-collectable values must be printed as a
string, not as a pointer. (Bug introduced in commit e0cbaa50fa7).
</pre>
</div>
</content>
</entry>
<entry>
<title>Corrected direct use of 'snprintf' in 'lstrlib.c'</title>
<updated>2020-02-28T13:37:14+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-02-28T13:37:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=92594f09395800f6f085ca7501ffd1f7aef25e22'/>
<id>92594f09395800f6f085ca7501ffd1f7aef25e22</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added test for NULL in string.format("%p")</title>
<updated>2019-12-17T13:49:55+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-12-17T13:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=e0cbaa50fa7e97a8b7404041a59caac47b3949a5'/>
<id>e0cbaa50fa7e97a8b7404041a59caac47b3949a5</id>
<content type='text'>
ISO C states that standard library functions should not be called
with NULL arguments, unless stated otherwise. 'sprintf' does not
state otherwise, and it doesn't hurt to be on the safe side.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ISO C states that standard library functions should not be called
with NULL arguments, unless stated otherwise. 'sprintf' does not
state otherwise, and it doesn't hurt to be on the safe side.
</pre>
</div>
</content>
</entry>
<entry>
<title>'l_mathlim' renamed to 'l_floatatt'</title>
<updated>2019-12-05T16:31:07+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-12-05T16:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=2d92102dee88a81711dca8e8ea3ef0ea9d732283'/>
<id>2d92102dee88a81711dca8e8ea3ef0ea9d732283</id>
<content type='text'>
That macro is applied to float attributes, not to limits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That macro is applied to float attributes, not to limits.
</pre>
</div>
</content>
</entry>
<entry>
<title>More pious implementation of 'string.dump'</title>
<updated>2019-10-23T13:31:02+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-10-23T13:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=6e285e539274920830eeec5cd2dde5eeca5863e4'/>
<id>6e285e539274920830eeec5cd2dde5eeca5863e4</id>
<content type='text'>
In 'str__dump', the call to 'lua_dump' assumes the function is on the
top of the stack, but the manual allows 'luaL_buffinit' to push stuff
on the stack (although the current implementation does not).  So, the
call to 'luaL_buffinit' must come after the call to 'lua_dump'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In 'str__dump', the call to 'lua_dump' assumes the function is on the
top of the stack, but the manual allows 'luaL_buffinit' to push stuff
on the stack (although the current implementation does not).  So, the
call to 'luaL_buffinit' must come after the call to 'lua_dump'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Easy redefinition of valid flags for 'string.format'</title>
<updated>2019-10-17T16:02:07+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-10-17T16:02:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=6055a039b57b405adc268672caeb682ef2a551ee'/>
<id>6055a039b57b405adc268672caeb682ef2a551ee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>No coercion string-&gt;number in arithmetic with LUA_NOCVTS2N</title>
<updated>2019-10-08T13:29:38+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-10-08T13:29:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=6a84c329005ab7fc3f17283feda3f41010728288'/>
<id>6a84c329005ab7fc3f17283feda3f41010728288</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added macro 'luaL_pushfail'</title>
<updated>2019-08-16T17:58:02+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-08-16T17:58:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=b96b0b5abbf40cbdbed7952bf35a5a27ddf75928'/>
<id>b96b0b5abbf40cbdbed7952bf35a5a27ddf75928</id>
<content type='text'>
The macro 'luaL_pushfail' documents all places in the standard libraries
that return nil to signal some kind of failure. It is defined as
'lua_pushnil'. The manual also got a notation (@fail) to document those
returns. The tests were changed to be agnostic regarding whether 'fail'
is 'nil' or 'false'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro 'luaL_pushfail' documents all places in the standard libraries
that return nil to signal some kind of failure. It is defined as
'lua_pushnil'. The manual also got a notation (@fail) to document those
returns. The tests were changed to be agnostic regarding whether 'fail'
is 'nil' or 'false'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed bug in 'string.format' with option '%f'</title>
<updated>2019-07-23T15:46:33+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-07-23T15:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=7f5c31cdcac5388b3c48a26112dfb6d2cadb7321'/>
<id>7f5c31cdcac5388b3c48a26112dfb6d2cadb7321</id>
<content type='text'>
As an example, 'print(string.format("%.99f", 1e70))' may have a
lot of garbage after the number.

The old test to ensure that 'string.format("%.99f", n)' was not too
large, 'fabs(n) &lt; 1e100', assumes that the number will fit in the 99
bytes; but the 99 is not the space for the number, it is the added
extra zeros.  The option worked for smaller numbers because of the
extra space added to MAX_ITEM.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As an example, 'print(string.format("%.99f", 1e70))' may have a
lot of garbage after the number.

The old test to ensure that 'string.format("%.99f", n)' was not too
large, 'fabs(n) &lt; 1e100', assumes that the number will fit in the 99
bytes; but the 99 is not the space for the number, it is the added
extra zeros.  The option worked for smaller numbers because of the
extra space added to MAX_ITEM.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid using large buffers in 'string.format'</title>
<updated>2019-04-12T14:48:24+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-04-12T14:48:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/lua-github.git/commit/?id=2d3f09544895b422eeecf89e0d108da8b8fcdfca'/>
<id>2d3f09544895b422eeecf89e0d108da8b8fcdfca</id>
<content type='text'>
The result of "string.format("%.99f", -1e308) is 410 characters long,
but all other formats have much smaller limits (at most 99 plus a fex
extras). This commit avoids 'string.format' asking for a buffer
~400 chars large when ~100 will do.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The result of "string.format("%.99f", -1e308) is 410 characters long,
but all other formats have much smaller limits (at most 99 plus a fex
extras). This commit avoids 'string.format' asking for a buffer
~400 chars large when ~100 will do.
</pre>
</div>
</content>
</entry>
</feed>
