random.c: unnecessary declarations
* random.c (random_ulong_limited, random_ulong_limited_big): remove unnecessary extern declarations. rb_num_negative_p is declared in internal.h now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f4edece0e1
commit
1a696e35c8
2
random.c
2
random.c
@ -987,7 +987,6 @@ static unsigned long
|
|||||||
random_ulong_limited(VALUE obj, rb_random_t *rnd, unsigned long limit)
|
random_ulong_limited(VALUE obj, rb_random_t *rnd, unsigned long limit)
|
||||||
{
|
{
|
||||||
if (!rnd) {
|
if (!rnd) {
|
||||||
extern int rb_num_negative_p(VALUE);
|
|
||||||
VALUE lim = ulong_to_num_plus_1(limit);
|
VALUE lim = ulong_to_num_plus_1(limit);
|
||||||
VALUE v = rb_to_int(rb_funcall2(obj, id_rand, 1, &lim));
|
VALUE v = rb_to_int(rb_funcall2(obj, id_rand, 1, &lim));
|
||||||
unsigned long r = NUM2ULONG(v);
|
unsigned long r = NUM2ULONG(v);
|
||||||
@ -1006,7 +1005,6 @@ static VALUE
|
|||||||
random_ulong_limited_big(VALUE obj, rb_random_t *rnd, VALUE vmax)
|
random_ulong_limited_big(VALUE obj, rb_random_t *rnd, VALUE vmax)
|
||||||
{
|
{
|
||||||
if (!rnd) {
|
if (!rnd) {
|
||||||
extern int rb_num_negative_p(VALUE);
|
|
||||||
VALUE lim = rb_big_plus(vmax, INT2FIX(1));
|
VALUE lim = rb_big_plus(vmax, INT2FIX(1));
|
||||||
VALUE v = rb_to_int(rb_funcall2(obj, id_rand, 1, &lim));
|
VALUE v = rb_to_int(rb_funcall2(obj, id_rand, 1, &lim));
|
||||||
if (rb_num_negative_p(v)) {
|
if (rb_num_negative_p(v)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user