Permalink
Browse files

NUM2LONG is easier to read

  • Loading branch information...
1 parent 2927172 commit de9e09a2faa44bd7c372759493cf2ded863b1cb0 @joshuaclayton committed Aug 28, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/sieve/sieve.c
View
@@ -10,8 +10,8 @@ void Init_sieve() {
}
static VALUE sieve(const VALUE self) {
- if(rb_num2long(self) < 0) { return Qnil; }
- long number = rb_num2long(self) + 1,
+ if(NUM2LONG(self) < 0) { return Qnil; }
+ long number = NUM2LONG(self) + 1,
* numbers = malloc(number * sizeof(long));
if(numbers == NULL) {

0 comments on commit de9e09a

Please sign in to comment.