https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112012-06-08T02:30:41ZRuby Issue Tracking SystemRuby master - Feature #6557: Make rb_hash_clear() publichttps://bugs.ruby-lang.org/issues/6557?journal_id=270712012-06-08T02:30:41Zibc (Iñaki Baz Castillo)ibc@aliax.net
<ul></ul><p>The same for rb_hash_size().</p> Ruby master - Feature #6557: Make rb_hash_clear() publichttps://bugs.ruby-lang.org/issues/6557?journal_id=270772012-06-08T05:13:26Znaruse (Yui NARUSE)naruse@airemix.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>ibc (Iñaki Baz Castillo) wrote:</p>
<blockquote>
<p>Any reason for rb_hash_clear() not to be public C API?:</p>
</blockquote>
<p>Because anyone hadn't request it to be public.<br>
If a function is a public, we can't change the API.<br>
So we don't make it public until anyone request it.</p>
<p>Now you request, could you show the use case of rb_hash_clear() ?</p> Ruby master - Feature #6557: Make rb_hash_clear() publichttps://bugs.ruby-lang.org/issues/6557?journal_id=270792012-06-08T06:33:00Zibc (Iñaki Baz Castillo)ibc@aliax.net
<ul></ul><p>Well, I have a C extension (a reactor based on libuv) in which I would like to perform the "loop release" within a single C function (to avoid some steps of the function to be interrupted by an exception or whatever). In such a "release" function I must clear some Ruby arrays and hashes.</p>
<p>Note that rb_ary_clear() is public.</p>
<p>PS: BTW, I don't receive mails when somebody comments or updates an issue reported by me, is it normal? I use Redmine so I'm sure I've properly configured my account in this Redmine.</p>
<p>Thanks a lot.</p> Ruby master - Feature #6557: Make rb_hash_clear() publichttps://bugs.ruby-lang.org/issues/6557?journal_id=337912012-11-24T14:18:20Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>Congrats, rb_hash_clear() was public since r37480.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p>