Skip to content

Commit

Permalink
apply guards to fix only ellint_D for GSL 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
boutil committed Mar 6, 2016
1 parent bae49b2 commit ae93f35
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ext/gsl_native/sf_ellint.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,18 @@ static VALUE rb_gsl_sf_ellint_P_e(VALUE obj, VALUE phi, VALUE k,
static VALUE rb_gsl_sf_ellint_D(int argc, VALUE *argv, VALUE obj)
{
if (argc == 3)
#if GSL_MAJOR_VERSION > 1
return rb_gsl_sf_eval_double2_m(gsl_sf_ellint_D, argv[0], argv[1],
#else
return rb_gsl_sf_eval_double3_m(gsl_sf_ellint_D, argv[0], argv[1], argv[2],
#endif
INT2FIX(GSL_PREC_DOUBLE));
else
#if GSL_MAJOR_VERSION > 1
return rb_gsl_sf_eval_double2_m(gsl_sf_ellint_D, argv[0], argv[1],
#else
return rb_gsl_sf_eval_double3_m(gsl_sf_ellint_D, argv[0], argv[1], argv[2],
#endif
argv[3]);
}

Expand Down

0 comments on commit ae93f35

Please sign in to comment.