|
Ruby 4.1.0dev (2026-11-19 revision 1e71e987c206d5d77bf37e883aaa6262747b2458)
|
Defines #NEWOBJ. More...
#include "ruby/internal/attr/deprecated.h"#include "ruby/internal/cast.h"#include "ruby/internal/core/rbasic.h"#include "ruby/internal/dllexport.h"#include "ruby/internal/fl_type.h"#include "ruby/internal/special_consts.h"#include "ruby/internal/value.h"#include "ruby/assert.h"

Go to the source code of this file.
Macros | |
| #define | OBJSETUP rb_obj_setup |
| Old name of rb_obj_setup. | |
| #define | CLONESETUP rb_clone_setup |
| Old name of rb_clone_setup. | |
| #define | DUPSETUP rb_dup_setup |
| Old name of rb_dup_setup. | |
Functions | |
| VALUE | rb_obj_setup (VALUE obj, VALUE klass, VALUE type) |
| Fills common fields in the object. | |
| VALUE | rb_obj_class (VALUE obj) |
| Queries the class of an object. | |
| VALUE | rb_singleton_class_clone (VALUE obj) |
| Clones a singleton class. | |
| void | rb_singleton_class_attached (VALUE klass, VALUE obj) |
| Attaches a singleton class to its corresponding object. | |
| void | rb_copy_generic_ivar (VALUE clone, VALUE obj) |
| Copies the list of instance variables. | |
Defines #NEWOBJ.
Definition in file newobj.h.
Copies the list of instance variables.
3rd parties need not know, but there are several ways to store an object's instance variables, depending on its internal structure. This function makes sense when either of the passed objects are using so-called "generic" backend storage. This distinction is purely an implementation detail of rb_clone_setup(). People need not be aware of this working behind-the-scenes.
| [out] | clone | The destination object. |
| [in] | obj | The source object. |
Definition at line 2362 of file variable.c.
Referenced by rb_copy_generic_ivar().