<?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: util-src/ringbuffer.c history</title>
    <description>util-src/ringbuffer.c revision history</description>
    <item>
    <title>util.ringbuffer: find(): Fix find logic bugs</title>
    <link>http://hg.omfa.de/prosody-hg/log/67b68147ed1d/util-src/ringbuffer.c</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/util-src/ringbuffer.c</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: Add compat for prosody module name change to C sources</title>
    <link>http://hg.omfa.de/prosody-hg/log/a187600ec7d6/util-src/ringbuffer.c</link>
    <description><![CDATA[util: Add compat for prosody module name change to C sources]]></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, 17 Mar 2023 18:03:07 +0100</pubDate>
</item>
<item>
    <title>util-src: Remove Lua 5.1 compat macros</title>
    <link>http://hg.omfa.de/prosody-hg/log/1f6f05a98fcd/util-src/ringbuffer.c</link>
    <description><![CDATA[util-src: Remove Lua 5.1 compat macros<br/>
<br/>
Part of #1600]]></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, 01 Jul 2022 21:21:21 +0200</pubDate>
</item>
<item>
    <title>util.ringbuffer: Ensure unsigned chars are always returned from :byte()</title>
    <link>http://hg.omfa.de/prosody-hg/log/c3b3ac63f4c3/util-src/ringbuffer.c</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-src: Use the luaL_pushfail API added in Lua 5.4 to highlight all failure conditions</title>
    <link>http://hg.omfa.de/prosody-hg/log/6eb5d2bb11af/util-src/ringbuffer.c</link>
    <description><![CDATA[util-src: Use the luaL_pushfail API added in Lua 5.4 to highlight all failure conditions<br/>
<br/>
Actually just an alias of pushnil, but it does make it more obvious<br/>
where the failure conditions are, which is good for readability.]]></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>Sun, 07 Jun 2020 02:25:56 +0200</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/util-src/ringbuffer.c</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/util-src/ringbuffer.c</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/util-src/ringbuffer.c</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.*.c: Add static qualifiers everywhere</title>
    <link>http://hg.omfa.de/prosody-hg/log/94cacf9fd0ae/util-src/ringbuffer.c</link>
    <description><![CDATA[util.*.c: Add static qualifiers everywhere]]></description>
    <author>&#69;&#109;&#109;&#97;&#110;&#117;&#101;&#108;&#32;&#71;&#105;&#108;&#32;&#80;&#101;&#121;&#114;&#111;&#116;&#32;&#60;&#108;&#105;&#110;&#107;&#109;&#97;&#117;&#118;&#101;&#64;&#108;&#105;&#110;&#107;&#109;&#97;&#117;&#118;&#101;&#46;&#102;&#114;&#62;</author>
    <pubDate>Sun, 01 Dec 2019 20:25:20 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Fix typo in comment [codespell]</title>
    <link>http://hg.omfa.de/prosody-hg/log/856a40ec4a0a/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Fix typo in comment [codespell]]]></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, 06 Apr 2018 22:26:53 +0200</pubDate>
</item>
<item>
    <title>util.ringbuffer: Add method for discarding buffered data without returning it to lua</title>
    <link>http://hg.omfa.de/prosody-hg/log/e7214441523b/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Add method for discarding buffered data without returning it to lua]]></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>Sat, 24 Feb 2018 14:45:06 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Add various comments</title>
    <link>http://hg.omfa.de/prosody-hg/log/0e1d8f2f02bf/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Add various comments]]></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>Sat, 24 Feb 2018 14:44:46 +0100</pubDate>
</item>
<item>
    <title>util-src: Specify size of various tables to be allocated</title>
    <link>http://hg.omfa.de/prosody-hg/log/1c6a07606309/util-src/ringbuffer.c</link>
    <description><![CDATA[util-src: Specify size of various tables to be allocated]]></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, 09 Mar 2017 01:20:59 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Change types of length related variables to size_t [-Wsign-compare]</title>
    <link>http://hg.omfa.de/prosody-hg/log/8067828e7e40/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Change types of length related variables to size_t [-Wsign-compare]]]></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, 02 Mar 2017 19:22:07 +0100</pubDate>
</item>
<item>
    <title>util-src/*.c: Attach pointer * to name instead of type</title>
    <link>http://hg.omfa.de/prosody-hg/log/b8d694646597/util-src/ringbuffer.c</link>
    <description><![CDATA[util-src/*.c: Attach pointer * to name instead of type]]></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>Sun, 12 Feb 2017 16:42:29 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Remove address of buffer itself from __tostring since is now in the same struct</title>
    <link>http://hg.omfa.de/prosody-hg/log/74187ee6ed55/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Remove address of buffer itself from __tostring since is now in the same struct]]></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>Sun, 12 Feb 2017 15:51:32 +0100</pubDate>
</item>
<item>
    <title>util-src/*.c: Squeeze repeated blank lines</title>
    <link>http://hg.omfa.de/prosody-hg/log/a809dcfd0c5b/util-src/ringbuffer.c</link>
    <description><![CDATA[util-src/*.c: Squeeze repeated blank lines]]></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>Mon, 23 Jan 2017 18:33:35 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Allocate buffer itself as part of userdata (simpler, single allocation, no need for __gc)</title>
    <link>http://hg.omfa.de/prosody-hg/log/b4a08a514ebc/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Allocate buffer itself as part of userdata (simpler, single allocation, no need for __gc)]]></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>Sun, 22 Jan 2017 09:23:10 +0100</pubDate>
</item>
<item>
    <title>util.ringbuffer: Remove unused macros</title>
    <link>http://hg.omfa.de/prosody-hg/log/db15e9f6d77f/util-src/ringbuffer.c</link>
    <description><![CDATA[util.ringbuffer: Remove unused macros]]></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>Sun, 22 Jan 2017 04:05:41 +0100</pubDate>
</item>
<item>
    <title>util-src: Make C modules assert that the Lua runtime matches what it was compiled for</title>
    <link>http://hg.omfa.de/prosody-hg/log/54669df178c2/util-src/ringbuffer.c</link>
    <description><![CDATA[util-src: Make C modules assert that the Lua runtime matches what it was compiled for]]></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>Sun, 08 Jan 2017 14:21:08 +0100</pubDate>
</item>
<item>
    <title>Add util.ringbuffer, a ringbuffer with a file handle like interface</title>
    <link>http://hg.omfa.de/prosody-hg/log/2b4432cc9c29/util-src/ringbuffer.c</link>
    <description><![CDATA[Add util.ringbuffer, a ringbuffer with a file handle like interface]]></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>Tue, 02 Feb 2016 20:24:27 +0100</pubDate>
</item>

  </channel>
</rss>
