[Numpy-svn] r6214 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Dec 27 10:16:36 CST 2008


Author: cdavid
Date: 2008-12-27 10:16:18 -0600 (Sat, 27 Dec 2008)
New Revision: 6214

Modified:
   trunk/numpy/core/src/scalartypes.inc.src
Log:
Do not define FMTR and FMTI macros, as those are already defined on some platforms.

Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src	2008-12-27 16:15:41 UTC (rev 6213)
+++ trunk/numpy/core/src/scalartypes.inc.src	2008-12-27 16:16:18 UTC (rev 6214)
@@ -609,12 +609,6 @@
  * #NAME=FLOAT, DOUBLE, LONGDOUBLE#
  */
 
-#define FMT "%.*" NPY_@NAME@_FMT
-#define FMTR "%%.%i" NPY_@NAME@_FMT
-#define FMTI "%%+.%i" NPY_@NAME@_FMT
-#define CFMT1 "%.*" NPY_@NAME@_FMT "j"
-#define CFMT2 "(%.*" NPY_@NAME@_FMT "%+.*" NPY_@NAME@_FMT "j)"
-
 /* Both format functions are shameless copies from python floatobject and
  * complexobject files */
 static void
@@ -681,9 +675,9 @@
     }
     else {
 	char re[64], im[64];
-        PyOS_snprintf(format, sizeof(format), FMTR, prec);
+        PyOS_snprintf(format, sizeof(format), "%%.%i" NPY_@NAME@_FMT, prec);
         PyOS_ascii_formatd(re, sizeof(re), format, val.real);
-        PyOS_snprintf(format, sizeof(format), FMTI, prec);
+        PyOS_snprintf(format, sizeof(format), "%%+.%i" NPY_@NAME@_FMT, prec);
         PyOS_ascii_formatd(im, sizeof(im), format, val.imag);
         PyOS_snprintf(buf, buflen, "(%s%sj)", re, im);
     }



More information about the Numpy-svn mailing list