diff options
author | Peter Zhu <peter@peterzhu.ca> | 2024-02-14 12:04:48 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2024-03-14 12:53:04 -0400 |
commit | ff51dc56540c3ba574a4b3f606bafd57788f620f (patch) | |
tree | d1b9cac40922259af9f97d1bc1980efb482a2de2 /include/ruby/internal/newobj.h | |
parent | 8e1831406ffd385213f67baba0d1fe6d44e9e0ea (diff) |
[Feature #20265] Remove rb_newobj_of and RB_NEWOBJ_OF
Diffstat (limited to 'include/ruby/internal/newobj.h')
-rw-r--r-- | include/ruby/internal/newobj.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/include/ruby/internal/newobj.h b/include/ruby/internal/newobj.h index a990682d0c..6eee2fa5fa 100644 --- a/include/ruby/internal/newobj.h +++ b/include/ruby/internal/newobj.h @@ -29,40 +29,14 @@ #include "ruby/internal/value.h" #include "ruby/assert.h" -/** - * Identical to #RB_NEWOBJ, except it also accepts the allocating object's - * class and flags. - * - * @param obj Variable name. - * @param type Variable type. - * @param klass Object's class. - * @param flags Object's flags. - * @exception rb_eNoMemError No space left. - * @return An allocated object, filled with the arguments. - */ -#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags)) - -#define NEWOBJ_OF RB_NEWOBJ_OF /**< @old{RB_NEWOBJ_OF} */ #define OBJSETUP rb_obj_setup /**< @old{rb_obj_setup} */ #define CLONESETUP rb_clone_setup /**< @old{rb_clone_setup} */ #define DUPSETUP rb_dup_setup /**< @old{rb_dup_setup} */ RBIMPL_SYMBOL_EXPORT_BEGIN() - -/** - * This is the implementation detail of #RB_NEWOBJ_OF. - * - * @param klass Object's class. - * @param flags Object's flags. - * @exception rb_eNoMemError No space left. - * @return An allocated object, filled with the arguments. - */ -VALUE rb_newobj_of(VALUE klass, VALUE flags); - /** * Fills common fields in the object. * - * @note Prefer rb_newobj_of() to this function. * @param[in,out] obj A Ruby object to be set up. * @param[in] klass `obj` will belong to this class. * @param[in] type One of ::ruby_value_type. |