mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* include/ruby/ruby.h (RB_GC_GUARD_PTR): workaround for gcc
optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
eac0bd9714
commit
2503de61fc
2 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
Sun Oct 11 08:48:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sun Oct 11 09:04:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/ruby.h (RB_GC_GUARD_PTR): workaround for gcc
|
||||
optimization.
|
||||
|
||||
* include/ruby/ruby.h (ruby_exec_node): declared.
|
||||
|
||||
|
|
|
@ -387,7 +387,13 @@ enum ruby_value_type {
|
|||
static inline int rb_type(VALUE obj);
|
||||
#define TYPE(x) rb_type((VALUE)(x))
|
||||
|
||||
#define RB_GC_GUARD(v) (*(volatile VALUE *)&(v))
|
||||
#ifdef __GNUC__
|
||||
#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)
|
||||
#endif
|
||||
#define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v)))
|
||||
|
||||
void rb_check_type(VALUE,int);
|
||||
#define Check_Type(v,t) rb_check_type((VALUE)(v),t)
|
||||
|
|
Loading…
Reference in a new issue