Bug #7302

r37497 changes rb_enumeratorize without NEWS

Added by Yui NARUSE almost 3 years ago. Updated almost 3 years ago.

[ruby-core:49026]
Status:Closed
Priority:Normal
Assignee:Marc-Andre Lafortune
ruby -v:ruby 2.0.0dev (2012-11-07 trunk 37528) [x86_64-freebsd9.0] Backport:

Description

r37497 [Feature #6636] changed the prototype of rb_enumeratorize.
It is public Ruby CAPI.

I think it shouldn't be changed and add another CAPI like rb_enumeratorize_with_size.
At least a description should be add to NEWS

Associated revisions

Revision 37543
Added by Marc-Andre Lafortune almost 3 years ago

  • include/ruby/intern.h: Restore rb_enumeratorize as it was before r37497
    and introduce rb_enumeratorize_with_size instead. [#7302]

  • enumerator.c: ditto.

Revision 37543
Added by Marc-Andre Lafortune almost 3 years ago

  • include/ruby/intern.h: Restore rb_enumeratorize as it was before r37497
    and introduce rb_enumeratorize_with_size instead. [#7302]

  • enumerator.c: ditto.

History

#1 Updated by Marc-Andre Lafortune almost 3 years ago

Oh, please excuse my ignorance. I'll revert rb_enumeratorize to what it was and create rb_enumeratorize_with_size instead, as you suggest.

I thought that functions in intern.h were internal to CRuby... So, which headers are considered part of the Ruby CAPI?

#2 Updated by Yui NARUSE almost 3 years ago

marcandre (Marc-Andre Lafortune) wrote:

Oh, please excuse my ignorance. I'll revert rb_enumeratorize to what it was and create rb_enumeratorize_with_size instead, as you suggest.

I thought that functions in intern.h were internal to CRuby... So, which headers are considered part of the Ruby CAPI?

intern.h was meant to internal CAPI as you thought.
But it is install to system and includes many essential CAPIs like rb_ary_, rb_hash_, and so on.
Therefore people used it as if it is public, and we must treat it as public while they are still unofficial.

Because of this failure, we now created true internal header file, internal.h.
(some says those header files should be restructured, but it is still not worked)

#3 Updated by Marc-Andre Lafortune almost 3 years ago

  • Status changed from Assigned to Closed

naruse (Yui NARUSE) wrote:

Therefore people used it as if it is public, and we must treat it as public while they are still unofficial.

Thank you for the explanation.

Because of this failure, we now created true internal header file, internal.h.
(some says those header files should be restructured, but it is still not worked)

Count me in the "some" :-)

Fixed. Thanks for checking my commits.

Also available in: Atom PDF