* include/ruby/ruby.h (RB_GC_GUARD_PTR): add note.
* vm_backtrace.c (backtrace_to_str_ary): use RB_GC_GUARD() instead of
  RB_GC_GUARD_PTR() which has no effect.
  (backtrace_to_location_ary): ditto.
  (vm_backtrace_to_ary): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-11-30 00:38:24 +00:00
Родитель 82e6c75d14
Коммит 4f451dddeb
3 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,12 @@
Fri Nov 30 09:38:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (RB_GC_GUARD_PTR): add note.
* vm_backtrace.c (backtrace_to_str_ary): use RB_GC_GUARD() instead of
RB_GC_GUARD_PTR() which has no effect.
(backtrace_to_location_ary): ditto.
(vm_backtrace_to_ary): ditto.
Fri Nov 30 09:22:52 2012 Eric Hodel <drbrain@segment7.net>
* lib/rubygems/commands/contents_command.rb: Sort output from command.

Просмотреть файл

@ -512,6 +512,8 @@ enum ruby_value_type {
static inline int rb_type(VALUE obj);
#define TYPE(x) rb_type((VALUE)(x))
/* RB_GC_GUARD_PTR() is an intermediate macro, and has no effect by
* itself. don't use it directly */
#ifdef __GNUC__
#define RB_GC_GUARD_PTR(ptr) \
__extension__ ({volatile VALUE *rb_gc_guarded_ptr = (ptr); rb_gc_guarded_ptr;})

Просмотреть файл

@ -512,7 +512,7 @@ backtrace_to_str_ary(VALUE self, long lev, long n)
}
r = backtrace_collect(bt, lev, n, location_to_str_dmyarg, 0);
RB_GC_GUARD_PTR(&self);
RB_GC_GUARD(self);
return r;
}
@ -559,7 +559,7 @@ backtrace_to_location_ary(VALUE self, long lev, long n)
}
r = backtrace_collect(bt, lev, n, location_create, (void *)self);
RB_GC_GUARD_PTR(&self);
RB_GC_GUARD(self);
return r;
}
@ -770,7 +770,7 @@ vm_backtrace_to_ary(rb_thread_t *th, int argc, VALUE *argv, int lev_default, int
else {
r = backtrace_to_location_ary(btval, lev, n);
}
RB_GC_GUARD_PTR(&btval);
RB_GC_GUARD(btval);
return r;
}