mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
* class.c, gc.c, object.c, variable.c, vm_insnhelper.c,
include/ruby/ruby.h: separate RCLASS_CONST_TBL from RCLASS_IV_TBL. RCLASS_IV_TBL has contained not only instance variable table but also constant table. Now the two table are separated to RCLASS_CONST_TBL and RCLASS_IV_TBL. This is a preparation for private constant (see [ruby-dev:39685][ruby-core:32698]). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6ca3ad34a0
commit
2285a8d813
7 changed files with 78 additions and 40 deletions
4
object.c
4
object.c
|
@ -221,6 +221,10 @@ init_copy(VALUE dest, VALUE obj)
|
|||
st_free_table(RCLASS_IV_TBL(dest));
|
||||
RCLASS_IV_TBL(dest) = 0;
|
||||
}
|
||||
if (RCLASS_CONST_TBL(dest)) {
|
||||
st_free_table(RCLASS_CONST_TBL(dest));
|
||||
RCLASS_CONST_TBL(dest) = 0;
|
||||
}
|
||||
if (RCLASS_IV_TBL(obj)) {
|
||||
RCLASS_IV_TBL(dest) = st_copy(RCLASS_IV_TBL(obj));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue