1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* include/ruby/ruby.h (NUM2INT): cast to int.

(FIX2INT): ditto.
  (NUM2UINT): cast to unsigned int.
  (FIX2UINT): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-07-05 14:47:06 +00:00
parent 7b52d32bd7
commit d375b77352
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,10 @@
Sat Jul 5 23:42:23 2008 Tanaka Akira <akr@fsij.org>
* include/ruby/ruby.h (NUM2INT): cast to int.
(FIX2INT): ditto.
(NUM2UINT): cast to unsigned int.
(FIX2UINT): ditto.
Sat Jul 5 23:10:41 2008 Tanaka Akira <akr@fsij.org>
* io.c (rb_pipe): new function for handling EMFILE and ENFILE

View file

@ -357,13 +357,13 @@ VALUE rb_num2ulong(VALUE);
#define NUM2ULONG(x) rb_num2ulong((VALUE)x)
#if SIZEOF_INT < SIZEOF_LONG
long rb_num2int(VALUE);
#define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
#define NUM2INT(x) ((int)(FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x)))
long rb_fix2int(VALUE);
#define FIX2INT(x) rb_fix2int((VALUE)x)
#define FIX2INT(x) ((int)rb_fix2int((VALUE)x))
unsigned long rb_num2uint(VALUE);
#define NUM2UINT(x) rb_num2uint(x)
#define NUM2UINT(x) ((unsigned int)rb_num2uint(x))
unsigned long rb_fix2uint(VALUE);
#define FIX2UINT(x) rb_fix2uint(x)
#define FIX2UINT(x) ((unsigned int)rb_fix2uint(x))
#else
#define NUM2INT(x) ((int)NUM2LONG(x))
#define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))