<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://hg.omfa.de/prosody-hg/</link>
    <language>en-us</language>

    <title>prosody-hg: spec/util_ringbuffer_spec.lua history</title>
    <description>spec/util_ringbuffer_spec.lua revision history</description>
    <item>
    <title>util.ringbuffer: find(): Fix find logic bugs</title>
    <link>http://hg.omfa.de/prosody-hg/log/67b68147ed1d/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: find(): Fix find logic bugs<br/>
<br/>
If the buffer was full, find() would return earlier (wpos == rpos). Checking<br/>
blen is the better way to test if the buffer is empty.<br/>
<br/>
Secondly, the loop scanned for blen - l, but if l (length of needle) was<br/>
larger than the buffer length, this calculation would underflow and cause a<br/>
lot of spinning.<br/>
<br/>
New tests have been added to cover various edge cases of :find().]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Mon, 25 May 2026 14:44:20 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Fix incorrect returned position from :find() for #needle~=1</title>
    <link>http://hg.omfa.de/prosody-hg/log/2bcabbeac9b0/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Fix incorrect returned position from :find() for #needle~=1<br/>
<br/>
And add a test for :find()]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Mon, 25 May 2026 14:41:06 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Fix accidentally committed test change (thanks buildbot)</title>
    <link>http://hg.omfa.de/prosody-hg/log/f84e0e2faae2/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Fix accidentally committed test change (thanks buildbot)]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Thu, 25 Jun 2020 15:45:13 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Add some additional asserts to tests</title>
    <link>http://hg.omfa.de/prosody-hg/log/fc310727adfb/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Add some additional asserts to tests]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 24 Jun 2020 13:00:11 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Ensure unsigned chars are always returned from :byte()</title>
    <link>http://hg.omfa.de/prosody-hg/log/c3b3ac63f4c3/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Ensure unsigned chars are always returned from :byte()]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Wed, 24 Jun 2020 12:34:20 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Add test for :discard()</title>
    <link>http://hg.omfa.de/prosody-hg/log/8b5b35baf370/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Add test for :discard()]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Tue, 23 Jun 2020 16:50:26 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Add :sub() and :byte() methods equivalent to the string methods</title>
    <link>http://hg.omfa.de/prosody-hg/log/5e33926f4b43/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Add :sub() and :byte() methods equivalent to the string methods]]></description>
    <author>&#77;&#97;&#116;&#116;&#104;&#101;&#119;&#32;&#87;&#105;&#108;&#100;&#32;&#60;&#109;&#119;&#105;&#108;&#100;&#49;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;&#62;</author>
    <pubDate>Thu, 04 Jun 2020 15:19:20 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Prevent creation of buffer with negative size</title>
    <link>http://hg.omfa.de/prosody-hg/log/8048255ae61e/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Prevent creation of buffer with negative size<br/>
<br/>
Previously this would have been (unsigned)-1 which is a large positive<br/>
integer.]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Thu, 04 Jun 2020 16:11:08 +0200</pubDate>
</item>
<item>
    <title>util.ringbuffer: Prevent creation of zero-size buffer</title>
    <link>http://hg.omfa.de/prosody-hg/log/c6465fb3c839/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Prevent creation of zero-size buffer]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 29 May 2020 18:11:42 +0200</pubDate>
</item>
<item>
    <title>util.ringbuffer: Add some initial tests</title>
    <link>http://hg.omfa.de/prosody-hg/log/37df1e757f02/spec/util_ringbuffer_spec.lua</link>
    <description><![CDATA[util.ringbuffer: Add some initial tests]]></description>
    <author>&#75;&#105;&#109;&#32;&#65;&#108;&#118;&#101;&#102;&#117;&#114;&#32;&#60;&#122;&#97;&#115;&#104;&#64;&#122;&#97;&#115;&#104;&#46;&#115;&#101;&#62;</author>
    <pubDate>Fri, 29 May 2020 17:53:00 +0200</pubDate>
</item>

  </channel>
</rss>
