зеркало из https://github.com/github/ruby.git
ruby.h: RB_UNUSED_VAR from UNINITIALIZED_VAR
* include/ruby/ruby.h (RB_UNUSED_VAR): move code from UNINITIALIZED_VAR() in vm_core.h. * vm_core.h (UNINITIALIZED_VAR): use RB_UNUSED_VAR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
82b8467e23
Коммит
042594bb50
|
@ -1,3 +1,10 @@
|
|||
Thu Mar 21 23:14:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/ruby.h (RB_UNUSED_VAR): move code from
|
||||
UNINITIALIZED_VAR() in vm_core.h.
|
||||
|
||||
* vm_core.h (UNINITIALIZED_VAR): use RB_UNUSED_VAR().
|
||||
|
||||
Thu Mar 21 22:39:46 2013 Naohisa Goto <ngotogenome@gmail.com>
|
||||
|
||||
* marshal.c (marshal_dump, marshal_load): workaround for segv on
|
||||
|
|
|
@ -529,8 +529,10 @@ static inline volatile VALUE *rb_gc_guarded_ptr(volatile VALUE *ptr) {return ptr
|
|||
#endif
|
||||
#define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v)))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
|
||||
#if (defined(__clang__) && (__clang_major__ == 4 && __clang_minor__ == 2))
|
||||
#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 3
|
||||
#define RB_UNUSED_VAR(x) x = x
|
||||
#else
|
||||
#define RB_UNUSED_VAR(x) x
|
||||
#endif
|
||||
|
|
|
@ -115,13 +115,7 @@
|
|||
#define UNLIKELY(x) (x)
|
||||
#endif /* __GNUC__ >= 3 */
|
||||
|
||||
#if (defined(__clang__) && (__clang_major__ == 4 && __clang_minor__ == 2))
|
||||
#define UNINITIALIZED_VAR(x) x __attribute__((unused))
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 3
|
||||
#define UNINITIALIZED_VAR(x) x = x
|
||||
#else
|
||||
#define UNINITIALIZED_VAR(x) x
|
||||
#endif
|
||||
#define UNINITIALIZED_VAR(x) RB_UNUSED_VAR(x)
|
||||
|
||||
typedef unsigned long rb_num_t;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче