solaris + gcc fix
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 21 Jan 2010 21:16:24 +0000 (13:16 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 21 Jan 2010 21:16:24 +0000 (13:16 -0800)
Cython/Compiler/PyrexTypes.py

index e20f91cbe7cbf45a61291442a9663df69b82550b..d0f6f0a0916167c751113b173a96c510fc9957fe 100644 (file)
@@ -1063,6 +1063,11 @@ proto="""
     #include <complex.h>
   #endif
 #endif
+
+#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
+  #undef _Complex_I
+  #define _Complex_I 1.0fj
+#endif
 """)
 
 complex_real_imag_utility_code = UtilityCode(
@@ -1122,9 +1127,9 @@ impl="""
 #else
     static INLINE %(type)s %(type_name)s_from_parts(%(real_type)s x, %(real_type)s y) {
       %(type)s z;
-       z.real = x;
-       z.imag = y;
-       return z;
+      z.real = x;
+      z.imag = y;
+      return z;
     }
 #endif
 """)