diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 06:52:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-16 06:52:29 +0000 |
commit | 5e65d8f433f555af052ae6a32f42adb897778c58 (patch) | |
tree | 98a659fb41343c8a310749c8a55c4aaeba2ef4fb /bignum.c | |
parent | eb9bc2d2655c336a1e5a34af69fdf5bf2c7d0788 (diff) | |
download | ruby-5e65d8f433f555af052ae6a32f42adb897778c58.tar.gz |
* bignum.c (rb_big_new, rb_bigzero_p), range.c (rb_range_values):
added for random.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -53,6 +53,12 @@ bigzero_p(VALUE x) } int +rb_bigzero_p(VALUE x) +{ + return BIGZEROP(x); +} + +int rb_cmpint(VALUE val, VALUE a, VALUE b) { if (NIL_P(val)) { @@ -143,6 +149,12 @@ bignew_1(VALUE klass, long len, int sign) #define bignew(len,sign) bignew_1(rb_cBignum,len,sign) VALUE +rb_big_new(long len, int sign) +{ + return bignew(len, sign != 0); +} + +VALUE rb_big_clone(VALUE x) { VALUE z = bignew_1(CLASS_OF(x), RBIGNUM_LEN(x), RBIGNUM_SIGN(x)); |