summaryrefslogtreecommitdiff
path: root/include/ruby/internal/newobj.h
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-02-14 10:52:43 -0500
committerPeter Zhu <[email protected]>2024-03-14 12:53:04 -0400
commit8e1831406ffd385213f67baba0d1fe6d44e9e0ea (patch)
tree294cbd127547cabf8312459a5b1c7bcb01c613df /include/ruby/internal/newobj.h
parent161545d55d894f42535fa5de7ac19cfb57122a2d (diff)
[Feature #20265] Remove rb_newobj and RB_NEWOBJ
Diffstat (limited to 'include/ruby/internal/newobj.h')
-rw-r--r--include/ruby/internal/newobj.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/include/ruby/internal/newobj.h b/include/ruby/internal/newobj.h
index ba1d7cbe59..a990682d0c 100644
--- a/include/ruby/internal/newobj.h
+++ b/include/ruby/internal/newobj.h
@@ -30,21 +30,6 @@
#include "ruby/assert.h"
/**
- * Declares, allocates, then assigns a new object to the given variable.
- *
- * @param obj Variable name.
- * @param type Variable type.
- * @exception rb_eNoMemError No space left.
- * @return An allocated object, not initialised.
- * @note Modern programs tend to use #NEWOBJ_OF instead.
- *
- * @internal
- *
- * :FIXME: Should we deprecate it?
- */
-#define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj())
-
-/**
* Identical to #RB_NEWOBJ, except it also accepts the allocating object's
* class and flags.
*
@@ -57,20 +42,12 @@
*/
#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags))
-#define NEWOBJ RB_NEWOBJ /**< @old{RB_NEWOBJ} */
#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.
- *
- * @exception rb_eNoMemError No space left.
- * @return An allocated object, not initialised.
- */
-VALUE rb_newobj(void);
/**
* This is the implementation detail of #RB_NEWOBJ_OF.