From a2868ff65166b27acbbda4af1b9df84ed3171541 Mon Sep 17 00:00:00 2001 From: knu Date: Tue, 29 Oct 2002 21:35:28 +0000 Subject: * eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c, ext/socket/socket.c: differentiate long and int; use proper printf type specifiers and do casts where appropriate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ruby.h') diff --git a/ruby.h b/ruby.h index ed18bf0c9e..f179d78744 100644 --- a/ruby.h +++ b/ruby.h @@ -240,10 +240,10 @@ int rb_fix2int _((VALUE)); #define NUM2UINT(x) ((unsigned int)NUM2INT(x)) #define FIX2UINT(x) ((unsigned int)FIX2INT(x)) #else -#define NUM2INT(x) NUM2LONG(x) -#define NUM2UINT(x) NUM2ULONG(x) -#define FIX2INT(x) FIX2LONG(x) -#define FIX2UINT(x) FIX2ULONG(x) +#define NUM2INT(x) ((int)NUM2LONG(x)) +#define NUM2UINT(x) ((unsigned int)NUM2ULONG(x)) +#define FIX2INT(x) ((int)FIX2LONG(x)) +#define FIX2UINT(x) ((unsigned int)FIX2ULONG(x)) #endif #if HAVE_LONG_LONG -- cgit v1.2.3