Ticket #50338: patch-gsl-mgsl_sf.c.diff

File patch-gsl-mgsl_sf.c.diff, 2.1 KB (added by christian.halaszovich@…, 9 years ago)
  • gsl/mlgsl_sf.c

    old new  
    258258SF3(ellint_F, Double_val, Double_val, GSL_MODE_val)
    259259SF3(ellint_E, Double_val, Double_val, GSL_MODE_val)
    260260SF4(ellint_P, Double_val, Double_val, Double_val, GSL_MODE_val)
    261 SF4(ellint_D, Double_val, Double_val, Double_val, GSL_MODE_val)
     261SF3(ellint_D, Double_val, Double_val, GSL_MODE_val)
    262262SF3(ellint_RC, Double_val, Double_val, GSL_MODE_val)
    263263SF4(ellint_RD, Double_val, Double_val, Double_val, GSL_MODE_val)
    264264SF4(ellint_RF, Double_val, Double_val, Double_val, GSL_MODE_val)
     
    453453
    454454/* Associated Legendre Polynomials and Spherical Harmonics  */
    455455SF3(legendre_Plm, Int_val, Int_val, Double_val)
    456 CAMLprim value
     456/* CAMLprim value
    457457ml_gsl_sf_legendre_Plm_array(value lmax, value m, value x, value result_array)
    458 {
    459   gsl_sf_legendre_Plm_array(Int_val(lmax),
    460                             Int_val(m),
    461                             Double_val(x),
    462                             Double_array_val(result_array));
    463   return Val_unit;
    464 }
    465458
     459 ******
     460 function removed to make it work with gsl 2.1
     461 */
    466462SF3(legendre_sphPlm, Int_val, Int_val, Double_val)
    467 CAMLprim value
     463/* CAMLprim value
    468464ml_gsl_sf_legendre_sphPlm_array(value lmax, value m,
    469                                 value x, value result_array)
    470 {
    471   gsl_sf_legendre_sphPlm_array(Int_val(lmax),
    472                                Int_val(m),
    473                                Double_val(x),
    474                                Double_array_val(result_array));
    475   return Val_unit;
    476 }
     465                                                                value x, value result_array)
     466 *****
     467 function removed to make it work with gsl 2.1
    477468
     469 */
    478470CAMLprim value
    479471ml_gsl_sf_legendre_array_size(value lmax, value m)
    480472{
     
    482474  CAMLlocal1(ret);
    483475  int gsl_ret;
    484476
    485   gsl_ret = gsl_sf_legendre_array_size(Int_val(lmax), Int_val(m));
     477  // hack for compatibility with V2.1 of gsl lib, since gsl_sf_legendre_array_size seem deprecated
     478  // I'm not sure this is correct...
     479  gsl_ret = gsl_sf_legendre_array_index(Int_val(lmax), Int_val(m));
    486480 
    487481  ret = Val_int(gsl_ret);
    488482  CAMLreturn(ret);