Project

General

Profile

Feature #9916

Hide Struct internal

Added by Shyouhei Urabe over 2 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
[ruby-core:62982]

Description

is a bit big so I attach the proposal but basically same as my previous proposals. I'd like to make strct RStruct opaque. The benefit is that by hiding its const VALUE* ptr part we can optimize GC pressure. That GC tweaks are not included in the attached patch because I prefer compatibility here. But this patch does make things easier.

opaque-RStruct.patch View (6.16 KB) Shyouhei Urabe, 06/07/2014 12:05 PM

Associated revisions

Revision 55788
Added by Shyouhei Urabe about 2 months ago

hide struct internal [Feature #9916]

* include/ruby/ruby.h (struct RStruct): no longer.

* internal.h (struct RStruct): moved here.

* struct.c (rb_struct_ptr): a compensation function for the lack
  of RSTRUCT_PTR.  But now that we have RSTRUCT_GET/SET, that must
  not be used anyway.  I mark this deprecated.  Dont use it.

History

#1 [ruby-core:63222] Updated by Yukihiro Matsumoto over 2 years ago

Approved.

Matz.

#2 [ruby-core:63654] Updated by Hiroshi SHIBATA about 2 years ago

  • Assignee set to Shyouhei Urabe

#3 [ruby-core:63655] Updated by Hiroshi SHIBATA about 2 years ago

  • Status changed from Open to Assigned

#4 Updated by Shyouhei Urabe about 2 months ago

  • Status changed from Assigned to Closed

Applied in changeset r55788.


hide struct internal [Feature #9916]

* include/ruby/ruby.h (struct RStruct): no longer.

* internal.h (struct RStruct): moved here.

* struct.c (rb_struct_ptr): a compensation function for the lack
  of RSTRUCT_PTR.  But now that we have RSTRUCT_GET/SET, that must
  not be used anyway.  I mark this deprecated.  Dont use it.

Also available in: Atom PDF