зеркало из https://github.com/github/ruby.git
* include/ruby/ruby.h (VALUE): prefer long over uintptr_t,
FIX2LONG expects VALUE to be long at least. * include/ruby/ruby.h (FIX2LONG): parenthesize the argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a45936d454
Коммит
8a4966d133
|
@ -1,3 +1,10 @@
|
||||||
|
Fri Oct 15 22:47:31 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* include/ruby/ruby.h (VALUE): prefer long over uintptr_t,
|
||||||
|
FIX2LONG expects VALUE to be long at least.
|
||||||
|
|
||||||
|
* include/ruby/ruby.h (FIX2LONG): parenthesize the argument.
|
||||||
|
|
||||||
Fri Oct 15 20:30:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Oct 15 20:30:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in (dev_t): use RUBY_REPLACE_TYPE.
|
* configure.in (dev_t): use RUBY_REPLACE_TYPE.
|
||||||
|
|
|
@ -83,7 +83,7 @@ extern "C" {
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined HAVE_UINTPTR_T
|
#if defined HAVE_UINTPTR_T && 0
|
||||||
typedef uintptr_t VALUE;
|
typedef uintptr_t VALUE;
|
||||||
typedef uintptr_t ID;
|
typedef uintptr_t ID;
|
||||||
# define SIGNED_VALUE intptr_t
|
# define SIGNED_VALUE intptr_t
|
||||||
|
@ -313,7 +313,7 @@ rb_long2int(long n) {rb_long2int_internal(n, i); return i;}
|
||||||
#define NUM2GIDT(v) NUM2LONG(v)
|
#define NUM2GIDT(v) NUM2LONG(v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1)
|
#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)(x),1)
|
||||||
#define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX)
|
#define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX)
|
||||||
#define FIXNUM_P(f) (((SIGNED_VALUE)(f))&FIXNUM_FLAG)
|
#define FIXNUM_P(f) (((SIGNED_VALUE)(f))&FIXNUM_FLAG)
|
||||||
#define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)
|
#define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче