Author: bugman Date: Mon Apr 29 10:31:46 2013 New Revision: 19601 URL: http://svn.gna.org/viewcvs/relax?rev=19601&view=rev Log: Converted the Py_BuildValue() calls to PyFloat_FromDouble() in the relax_fit C module. This doesn't change much. Modified: trunk/target_functions/relax_fit.c Modified: trunk/target_functions/relax_fit.c URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/relax_fit.c?rev=19601&r1=19600&r2=19601&view=diff ============================================================================== --- trunk/target_functions/relax_fit.c (original) +++ trunk/target_functions/relax_fit.c Mon Apr 29 10:31:46 2013 @@ -105,7 +105,7 @@ exponential(params, relax_times, back_calc, num_times); /* Calculate and return the chi-squared value */ - return Py_BuildValue("f", chi2(values,sd,back_calc,num_times)); + return PyFloat_FromDouble(chi2(values,sd,back_calc,num_times)); } @@ -141,7 +141,7 @@ * This is currently unimplemented. */ - return Py_BuildValue("f", 0.0); + return PyFloat_FromDouble(0.0); } @@ -155,7 +155,7 @@ /* Copy the values out of the C array into the Python array */ for (i = 0; i < num_times; i++) - PyList_SetItem(back_calc_py, i, Py_BuildValue("f", back_calc[i])); + PyList_SetItem(back_calc_py, i, PyFloat_FromDouble(back_calc[i])); /* Return the numpy array */ return back_calc_py;