diff options
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index a9fd974614..edfa3f41a1 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -420,7 +420,8 @@ static inline int rb_type(VALUE obj); #define RB_GC_GUARD_PTR(ptr) \ __extension__ ({volatile VALUE *rb_gc_guarded_ptr = (ptr); rb_gc_guarded_ptr;}) #else -#define RB_GC_GUARD_PTR(ptr) (volatile VALUE *)(ptr) +static inline volatile VALUE *rb_gc_guarded_ptr(volatile VALUE *ptr) {return ptr;} +#define RB_GC_GUARD_PTR(ptr) rb_gc_guarded_ptr(ptr) #endif #define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v))) |