Project

General

Profile

Bug #4828 ยป typeddata_check_at_finalize.patch

nagachika (Tomoyuki Chikanaga), 06/08/2011 11:11 PM

View differences:

gc.c
while (p < pend) {
if (BUILTIN_TYPE(p) == T_DATA &&
DATA_PTR(p) && RANY(p)->as.data.dfree &&
RANY(p)->as.basic.klass != rb_cThread && RANY(p)->as.basic.klass != rb_cMutex) {
!rb_obj_is_thread((VALUE)p) && !rb_obj_is_mutex((VALUE)p) ) {
p->as.free.flags = 0;
if (RTYPEDDATA_P(p)) {
RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
internal.h
VALUE rb_big_uminus(VALUE x);
VALUE rb_obj_is_thread(VALUE obj);
VALUE rb_obj_is_mutex(VALUE obj);
#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */
thread.c
{mutex_mark, mutex_free, mutex_memsize,},
};
VALUE
rb_obj_is_mutex(VALUE obj)
{
if (rb_typeddata_is_kind_of(obj, &mutex_data_type)) {
return Qtrue;
}
else {
return Qfalse;
}
}
static VALUE
mutex_alloc(VALUE klass)
{
vm.c
},
};
VALUE
rb_obj_is_thread(VALUE obj)
{
if (rb_typeddata_is_kind_of(obj, &thread_data_type)) {
return Qtrue;
}
else {
return Qfalse;
}
}
static VALUE
thread_alloc(VALUE klass)
{
    (1-1/1)