mailr17704 - /trunk/maths_fns/relax_fit.c


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 05, 2012 - 19:45:
Author: bugman
Date: Fri Oct  5 19:45:46 2012
New Revision: 17704

URL: http://svn.gna.org/viewcvs/relax?rev=17704&view=rev
Log:
The relaxation curve-fitting C module now supports compilation on both Python 
2 and 3.


Modified:
    trunk/maths_fns/relax_fit.c

Modified: trunk/maths_fns/relax_fit.c
URL: 
http://svn.gna.org/viewcvs/relax/trunk/maths_fns/relax_fit.c?rev=17704&r1=17703&r2=17704&view=diff
==============================================================================
--- trunk/maths_fns/relax_fit.c (original)
+++ trunk/maths_fns/relax_fit.c Fri Oct  5 19:45:46 2012
@@ -193,7 +193,7 @@
     static struct PyModuleDef moduledef = {
         PyModuleDef_HEAD_INIT,
         "relax_fit",         /* m_name */
-        "Relaxation curve-fitting C module",  /* m_doc */
+        "Relaxation curve-fitting C module.",  /* m_doc */
         -1,                  /* m_size */
         relax_fit_methods,   /* m_methods */
         NULL,                /* m_reload */
@@ -203,15 +203,13 @@
     };
 #endif
 
-/* Create the module */
-#if PY_MAJOR_VERSION >= 3
-    m = PyModule_Create(&moduledef);
-#endif
-
 /* Initialise as a Python module */
 PyMODINIT_FUNC
 #if PY_MAJOR_VERSION >= 3
     PyInit_relax_fit(void)
+    {
+        return PyModule_Create(&moduledef);
+    }
 #else
     initrelax_fit(void)
     {




Related Messages


Powered by MHonArc, Updated Fri Oct 05 20:00:02 2012