gc.c: use RUBY_DEFAULT_FREE instead of open-coded constant
Improves readability and makes future changes easier git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a4be5beda
commit
2be65894e1
2
gc.c
2
gc.c
@ -2978,7 +2978,7 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
|
|||||||
if (RTYPEDDATA_P(p)) {
|
if (RTYPEDDATA_P(p)) {
|
||||||
RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
|
RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
|
||||||
}
|
}
|
||||||
if (RANY(p)->as.data.dfree == (RUBY_DATA_FUNC)-1) {
|
if (RANY(p)->as.data.dfree == RUBY_DEFAULT_FREE) {
|
||||||
xfree(DATA_PTR(p));
|
xfree(DATA_PTR(p));
|
||||||
}
|
}
|
||||||
else if (RANY(p)->as.data.dfree) {
|
else if (RANY(p)->as.data.dfree) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user