summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-09 14:53:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-09 14:53:16 +0000
commitc3b67013711589dbf5960ed2ebfff248308b9f65 (patch)
tree7f10fb94290533098dbef5985b8faa8b4973449e /include/ruby
parent5bd7289ab682be9538766876ecc99fc7520874b7 (diff)
* include/ruby/ruby.h (RB_GC_GUARD_PTR): get rid of removal by
optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/ruby.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 981f4f6e73..6057c5b17b 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)))