Skip to content

Commit

Permalink
Replaced jv_is_integer() with jv_integer_is_large()
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeit-internet2 committed Apr 3, 2019
1 parent 4b1fc7c commit afc7780
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions src/jv.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,6 @@ int jv_is_integer(jv j){
return 0;
}
double x = jv_number_value(j);
if(x != x || x > INT_MAX || x < INT_MIN){
return 0;
}

return x == (int)x;
}

int jv_is_integer_large(jv j){
if(jv_get_kind(j) != JV_KIND_NUMBER){
return 0;
}
double x = jv_number_value(j);

double ipart;
double fpart = modf(x, &ipart);
Expand Down
1 change: 0 additions & 1 deletion src/jv.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jv jv_bool(int);
jv jv_number(double);
double jv_number_value(jv);
int jv_is_integer(jv);
int jv_is_integer_large(jv);

jv jv_array(void);
jv jv_array_sized(int);
Expand Down

0 comments on commit afc7780

Please sign in to comment.