Project

General

Profile

Actions

Feature #7177

closed

Proposal of a new C API

Added by authorNari (Narihiro Nakamura) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
[ruby-core:48046]

Description

Hi.

We uses rb_newobj() in CRuby when we allocates any object.
However, this function has no arguments, so we can not change a
internal allocate method depending klass and flags of any object.

So I propose to add following new C APIs.

  • VALUE rb_newobj_of(VALUE klass, VALUE flags);
  • #define NEWOBJ_OF(obj,type,klass,flags)

A patch is here.
https://github.com/authorNari/ruby/compare/trunk...rb_newobj2

rb_newobj_of() is named by Matz. I think it's a fitting name.
Please let me know if you have more good name.

Thanks.


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #7047: Add new C API: rb_newobj_withClosedauthorNari (Narihiro Nakamura)09/22/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0