<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/-test-/random/loop.c, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix memory leak reported in -test-/random/loop.c</title>
<updated>2024-08-12T13:33:20+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2024-08-09T14:57:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=568d7ab7f5862063107b3643c6cfe77a387f09d6'/>
<id>568d7ab7f5862063107b3643c6cfe77a387f09d6</id>
<content type='text'>
RUBY_TYPED_DEFAULT_FREE will only free the rand_loop_t, but it will cause
the buf to be leaked. This commit fixes the memory leak by implementing
a free function for the rand_loop_t type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RUBY_TYPED_DEFAULT_FREE will only free the rand_loop_t, but it will cause
the buf to be leaked. This commit fixes the memory leak by implementing
a free function for the rand_loop_t type.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compiler issues in test on C99</title>
<updated>2022-11-10T14:07:20+00:00</updated>
<author>
<name>Peter Zhu</name>
<email>peter@peterzhu.ca</email>
</author>
<published>2022-11-10T14:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=68bd1d685579f9ae96f1c8160cf1fd9820e508da'/>
<id>68bd1d685579f9ae96f1c8160cf1fd9820e508da</id>
<content type='text'>
Fixes the following issue when compiling using C99:

ext/-test-/rb_call_super_kw/rb_call_super_kw.c
ext/-test-/random/loop.c:16:39: error: extra ';' outside of a function [-Werror,-Wextra-semi]
RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the following issue when compiling using C99:

ext/-test-/rb_call_super_kw/rb_call_super_kw.c
ext/-test-/random/loop.c:16:39: error: extra ';' outside of a function [-Werror,-Wextra-semi]
RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop);
</pre>
</div>
</content>
</entry>
<entry>
<title>[Bug #19100] Add `init_int32` function to `rb_random_interface_t`</title>
<updated>2022-11-10T03:06:13+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-09T10:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b7e8876704648cee6866591ac1aca7a54faff742'/>
<id>b7e8876704648cee6866591ac1aca7a54faff742</id>
<content type='text'>
Distinguish initialization by single word from initialization by
array.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Distinguish initialization by single word from initialization by
array.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add FALLTHROUGH</title>
<updated>2020-09-08T01:30:07+00:00</updated>
<author>
<name>Kazuhiro NISHIYAMA</name>
<email>zn@mbf.nifty.com</email>
</author>
<published>2020-09-08T01:30:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5be75aad3792c90f1d4de424fc07bc4f652e554e'/>
<id>5be75aad3792c90f1d4de424fc07bc4f652e554e</id>
<content type='text'>
Pointed out by Coverity Scan

```
** CID 1466646: Control flow issues (MISSING_BREAK)
/ext/-test-/random/loop.c: 63 in loop_get_bytes()
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pointed out by Coverity Scan

```
** CID 1466646: Control flow issues (MISSING_BREAK)
/ext/-test-/random/loop.c: 63 in loop_get_bytes()
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Added `rb_random_base_init`</title>
<updated>2020-09-07T11:08:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-09-07T09:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2b07b24bdf15e4feeb9dae94a17999070cd77121'/>
<id>2b07b24bdf15e4feeb9dae94a17999070cd77121</id>
<content type='text'>
To enclose the initialization of Random::Base part.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To enclose the initialization of Random::Base part.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added WITH_REAL macros</title>
<updated>2020-09-07T11:08:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-09-07T09:51:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4924011262e35e3983e245cbfcff15aee7b295f3'/>
<id>4924011262e35e3983e245cbfcff15aee7b295f3</id>
<content type='text'>
Added `WITH_REAL` versions to `RB_RANDOM_INTERFACE` macros.  Also
these macros including "without real" versions no longer contain
the terminator (semicolon and comma).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added `WITH_REAL` versions to `RB_RANDOM_INTERFACE` macros.  Also
these macros including "without real" versions no longer contain
the terminator (semicolon and comma).
</pre>
</div>
</content>
</entry>
<entry>
<title>Added `get_real` interface</title>
<updated>2020-09-07T11:08:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2020-04-14T15:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d6ec0ef59b4c7c95beaad09f77cb5f86a0901b97'/>
<id>d6ec0ef59b4c7c95beaad09f77cb5f86a0901b97</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>separate rb_random_t</title>
<updated>2020-09-07T11:08:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2016-05-07T02:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=af5e87ab218c5f4e34c6cdb54ae119a7f0f9033f'/>
<id>af5e87ab218c5f4e34c6cdb54ae119a7f0f9033f</id>
<content type='text'>
* random.c: separate abstract rb_random_t and rb_random_mt_t for
  Mersenne Twister implementation.

* include/ruby/random.h: the interface for extensions of Random
  class.

* DLL imported symbol reference is not constant on Windows.

* check if properly initialized.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* random.c: separate abstract rb_random_t and rb_random_mt_t for
  Mersenne Twister implementation.

* include/ruby/random.h: the interface for extensions of Random
  class.

* DLL imported symbol reference is not constant on Windows.

* check if properly initialized.
</pre>
</div>
</content>
</entry>
</feed>
