Bug #4803
closed
RCLASS_SUPER won't compile for C extensions as of revision 31627
Added by dazuma (Daniel Azuma) almost 13 years ago.
Updated almost 13 years ago.
Description
The RCLASS_SUPER macro (defined in ruby.h) no longer compiles for C extensions because the required rb_classext_t type has been made opaque as of svn revision 31627. This is breaking certain gems that rely on RCLASS_SUPER to hack the class tree, such as blockenspiel and mixology.
Can anyone explain to me the rationale behind moving the rb_classext_t definition into internal.h, and what I should do in 1.9.3 to access the functionality of RCLASS_SUPER? I need to access and set the direct superclass, even if it's a T_ICLASS, so calling rb_class_superclass() is not sufficient. Thanks!
- ruby -v changed from ruby 1.9.3dev (2011-05-30 trunk 31805) [x86_64-darwin10.7.4] to -
Hi,
In message "Re: [ruby-core:36566] [Ruby 1.9 - Bug #4803] RCLASS_SUPER won't compile for C extensions as of revision 31627"
on Mon, 30 May 2011 14:53:13 +0900, Daniel Azuma dazuma@gmail.com writes:
|
|Can anyone explain to me the rationale behind moving the rb_classext_t definition into internal.h, and what I should do in 1.9.3 to access the functionality of RCLASS_SUPER? I need to access and set the direct superclass, even if it's a T_ICLASS, so calling rb_class_superclass() is not sufficient. Thanks!
I think Nobu considered rb_classext_t should not be disclosed to
extensions, but since some extensions already use it, it might be
better to make it public anyway.
matz.
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
Hi,
At Mon, 6 Jun 2011 23:47:57 +0900,
Roger Pack wrote in [ruby-core:36791]:
rb_class_superclass() since 1.4.0.
Appears it has become public with 1.9.3?
Sure, it had been static, sorry.
So you can use it if available, RCLASS_SUPER() if defined, or
the member directly.
--
Nobu Nakada
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r32162.
Daniel, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- include/ruby/backward/classext.h: for evil gems. fixed #4803
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0