Skip to content

Commit ae93f35

Browse files
committed
apply guards to fix only ellint_D for GSL 2.x
1 parent bae49b2 commit ae93f35

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/gsl_native/sf_ellint.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,18 @@ static VALUE rb_gsl_sf_ellint_P_e(VALUE obj, VALUE phi, VALUE k,
8282
static VALUE rb_gsl_sf_ellint_D(int argc, VALUE *argv, VALUE obj)
8383
{
8484
if (argc == 3)
85+
#if GSL_MAJOR_VERSION > 1
8586
return rb_gsl_sf_eval_double2_m(gsl_sf_ellint_D, argv[0], argv[1],
87+
#else
88+
return rb_gsl_sf_eval_double3_m(gsl_sf_ellint_D, argv[0], argv[1], argv[2],
89+
#endif
8690
INT2FIX(GSL_PREC_DOUBLE));
8791
else
92+
#if GSL_MAJOR_VERSION > 1
8893
return rb_gsl_sf_eval_double2_m(gsl_sf_ellint_D, argv[0], argv[1],
94+
#else
95+
return rb_gsl_sf_eval_double3_m(gsl_sf_ellint_D, argv[0], argv[1], argv[2],
96+
#endif
8997
argv[3]);
9098
}
9199

0 commit comments

Comments
 (0)