[Numpy-svn] r6206 - trunk/numpy/core/code_generators

numpy-svn@scip... numpy-svn@scip...
Sat Dec 27 06:18:54 CST 2008


Author: cdavid
Date: 2008-12-27 06:18:47 -0600 (Sat, 27 Dec 2008)
New Revision: 6206

Modified:
   trunk/numpy/core/code_generators/generate_numpy_api.py
Log:
Do not define the union for runtime endianness detection if we don't check endianness.

Modified: trunk/numpy/core/code_generators/generate_numpy_api.py
===================================================================
--- trunk/numpy/core/code_generators/generate_numpy_api.py	2008-12-27 11:46:08 UTC (rev 6205)
+++ trunk/numpy/core/code_generators/generate_numpy_api.py	2008-12-27 12:18:47 UTC (rev 6206)
@@ -65,10 +65,12 @@
 static int
 _import_array(void)
 {
+#ifdef WORDS_BIGENDIAN
   union {
     long i;
     char c[sizeof(long)];
   } bint = {1};
+#endif
 
   PyObject *numpy = PyImport_ImportModule("numpy.core.multiarray");
   PyObject *c_api = NULL;



More information about the Numpy-svn mailing list