Why so many methods rb_hash_xxxxx are not public?

Hi, is there any special reason for having most of the rb_hash_xxxx
methods not public? For example, I want to empty a Ruby hash from C
code, so I expected to use rb_hash_clear(VALUE hash), but… it’s
declared as static!!!

So why??? what is the “workaround”?

On May 14, 2012, at 08:11 , Iaki Baz C. wrote:

Hi, is there any special reason for having most of the rb_hash_xxxx
methods not public? For example, I want to empty a Ruby hash from C
code, so I expected to use rb_hash_clear(VALUE hash), but… it’s
declared as static!!!

So why??? what is the “workaround”?

rb_funcall. I highly doubt that calling rb_hash_clear is your
bottleneck.

2012/5/14 Ryan D. [email protected]:

rb_funcall. I highly doubt that calling rb_hash_clear is your bottleneck.

Right, but my problem is the GVL as reported here:

http://bugs.ruby-lang.org/issues/6433

Thanks.