[Scipy-svn] r5506 - in trunk/scipy/lib: blas lapack

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Jan 19 05:29:17 EST 2009


Author: cdavid
Date: 2009-01-19 04:29:13 -0600 (Mon, 19 Jan 2009)
New Revision: 5506

Modified:
   trunk/scipy/lib/blas/atlas_version.c
   trunk/scipy/lib/lapack/atlas_version.c
Log:
Do not show atlas build info when importing atlas_version: forgot to apply the changes to scipy.lib as well.

Modified: trunk/scipy/lib/blas/atlas_version.c
===================================================================
--- trunk/scipy/lib/blas/atlas_version.c	2009-01-19 10:26:55 UTC (rev 5505)
+++ trunk/scipy/lib/blas/atlas_version.c	2009-01-19 10:29:13 UTC (rev 5506)
@@ -1,24 +1,33 @@
-#ifdef __CPLUSPLUS__
-extern "C" {
-#endif
 #include "Python.h"
-static PyMethodDef module_methods[] = { {NULL,NULL} };
-PyMODINIT_FUNC initatlas_version(void) {
-  PyObject *m = NULL;
+
+static PyObject* version(PyObject* self, PyObject* dummy)
+{
 #if defined(NO_ATLAS_INFO)
-  printf("NO ATLAS INFO AVAILABLE\n");
+    printf("NO ATLAS INFO AVAILABLE\n");
 #else
-  void ATL_buildinfo(void);
-  ATL_buildinfo();
+    void ATL_buildinfo(void);
+    ATL_buildinfo();
 #endif
-  m = Py_InitModule("atlas_version", module_methods);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static char version_doc[] = "Print the build info from atlas.";
+
+static PyMethodDef module_methods[] = {
+    {"version", version, METH_VARARGS, version_doc},
+    {NULL, NULL, 0, NULL}
+};
+
+PyMODINIT_FUNC initatlas_version(void)
+{
+    PyObject *m = NULL;
+    m = Py_InitModule("atlas_version", module_methods);
 #if defined(ATLAS_INFO)
-  {
-    PyObject *d = PyModule_GetDict(m);
-    PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
-  }
+    {
+        PyObject *d = PyModule_GetDict(m);
+        PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
+    }
 #endif
 }
-#ifdef __CPLUSCPLUS__
-}
-#endif

Modified: trunk/scipy/lib/lapack/atlas_version.c
===================================================================
--- trunk/scipy/lib/lapack/atlas_version.c	2009-01-19 10:26:55 UTC (rev 5505)
+++ trunk/scipy/lib/lapack/atlas_version.c	2009-01-19 10:29:13 UTC (rev 5506)
@@ -1,24 +1,33 @@
-#ifdef __CPLUSPLUS__
-extern "C" {
-#endif
 #include "Python.h"
-static PyMethodDef module_methods[] = { {NULL,NULL} };
-PyMODINIT_FUNC initatlas_version(void) {
-  PyObject *m = NULL;
+
+static PyObject* version(PyObject* self, PyObject* dummy)
+{
 #if defined(NO_ATLAS_INFO)
-  printf("NO ATLAS INFO AVAILABLE\n");
+    printf("NO ATLAS INFO AVAILABLE\n");
 #else
-  void ATL_buildinfo(void);
-  ATL_buildinfo();
+    void ATL_buildinfo(void);
+    ATL_buildinfo();
 #endif
-  m = Py_InitModule("atlas_version", module_methods);
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static char version_doc[] = "Print the build info from atlas.";
+
+static PyMethodDef module_methods[] = {
+    {"version", version, METH_VARARGS, version_doc},
+    {NULL, NULL, 0, NULL}
+};
+
+PyMODINIT_FUNC initatlas_version(void)
+{
+    PyObject *m = NULL;
+    m = Py_InitModule("atlas_version", module_methods);
 #if defined(ATLAS_INFO)
-  {
-    PyObject *d = PyModule_GetDict(m);
-    PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
-  }
+    {
+        PyObject *d = PyModule_GetDict(m);
+        PyDict_SetItemString(d,"ATLAS_VERSION",PyString_FromString(ATLAS_INFO));
+    }
 #endif
 }
-#ifdef __CPLUSCPLUS__
-}
-#endif




More information about the Scipy-svn mailing list