From ae93f35f966cde6d6f8a4ddc76d9709c06a8df23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Boutillier?= Date: Sun, 6 Mar 2016 11:17:49 +0100 Subject: [PATCH] apply guards to fix only ellint_D for GSL 2.x --- ext/gsl_native/sf_ellint.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/gsl_native/sf_ellint.c b/ext/gsl_native/sf_ellint.c index 8425f95f..66169d21 100644 --- a/ext/gsl_native/sf_ellint.c +++ b/ext/gsl_native/sf_ellint.c @@ -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]); }