[Scipy-svn] r3270 - trunk/scipy/weave

scipy-svn@scip... scipy-svn@scip...
Mon Aug 27 17:56:09 CDT 2007


Author: stefan
Date: 2007-08-27 17:55:52 -0500 (Mon, 27 Aug 2007)
New Revision: 3270

Modified:
   trunk/scipy/weave/c_spec.py
   trunk/scipy/weave/ext_tools.py
Log:
Remove two more warnings.   An #ifdef is not ideal; better would be an
API to expose compiler features.


Modified: trunk/scipy/weave/c_spec.py
===================================================================
--- trunk/scipy/weave/c_spec.py	2007-08-27 22:18:00 UTC (rev 3269)
+++ trunk/scipy/weave/c_spec.py	2007-08-27 22:55:52 UTC (rev 3270)
@@ -268,8 +268,6 @@
         code = """
                PyObject* file_to_py(FILE* file, char* name, char* mode)
                {
-                   PyObject* py_obj = NULL;
-                   //extern int fclose(FILE *);
                    return (PyObject*) PyFile_FromFile(file, name, mode, fclose);
                }
                """

Modified: trunk/scipy/weave/ext_tools.py
===================================================================
--- trunk/scipy/weave/ext_tools.py	2007-08-27 22:18:00 UTC (rev 3269)
+++ trunk/scipy/weave/ext_tools.py	2007-08-27 22:55:52 UTC (rev 3270)
@@ -252,7 +252,7 @@
     def warning_code(self):
         all_warnings = self.build_information().warnings()
         w=map(lambda x: "#pragma warning(%s)\n" % x,all_warnings)
-        return ''.join(w)
+        return '#ifndef __GNUC__\n' + ''.join(w) + '\n#endif'
 
     def header_code(self):
         h = self.get_headers()



More information about the Scipy-svn mailing list