Skip to content

Commit

Permalink
* include/ruby/ruby.h (NUM2LONG_internal): add cast to get rid of a
Browse files Browse the repository at this point in the history
  non GCC compiler warning. this is intentional type conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Oct 27, 2010
1 parent bb2dc7e commit 6ef1aa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Wed Oct 27 11:58:58 2010 NAKAMURA Usaku <[email protected]>

* include/ruby/ruby.h (NUM2LONG_internal): add cast to get rid of a
non GCC compiler warning. this is intentional type conversion.

Wed Oct 27 09:25:46 2010 NARUSE, Yui <[email protected]>

* cont.c: apply documentation patch by Run Paint Run Run.
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/ruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ void rb_set_errinfo(VALUE);

SIGNED_VALUE rb_num2long(VALUE);
VALUE rb_num2ulong(VALUE);
#define NUM2LONG_internal(x) (FIXNUM_P(x) ? FIX2LONG(x) : rb_num2long(x))
#define NUM2LONG_internal(x) ((long)(FIXNUM_P(x) ? FIX2LONG(x) : rb_num2long(x)))
#ifdef __GNUC__
#define NUM2LONG(x) \
__extension__ ({VALUE num2long_x = (x); NUM2LONG_internal(num2long_x);})
Expand Down

0 comments on commit 6ef1aa7

Please sign in to comment.