[Numpy-svn] r5841 - branches/clean_math_config/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Sep 20 05:49:08 CDT 2008


Author: cdavid
Date: 2008-09-20 05:49:01 -0500 (Sat, 20 Sep 2008)
New Revision: 5841

Modified:
   branches/clean_math_config/numpy/core/src/math_c99.inc.src
Log:
Undef macro when using replacement functions in math_c99 module.

Modified: branches/clean_math_config/numpy/core/src/math_c99.inc.src
===================================================================
--- branches/clean_math_config/numpy/core/src/math_c99.inc.src	2008-09-20 10:18:59 UTC (rev 5840)
+++ branches/clean_math_config/numpy/core/src/math_c99.inc.src	2008-09-20 10:49:01 UTC (rev 5841)
@@ -215,6 +215,10 @@
  * hypot, atan2, pow, fmod, modf
  *
  * We assume the above are always available in their double versions.
+ *
+ * NOTE: some facilities may be available as macro only  instead of functions.
+ * For simplicity, we define our own functions and undef the macros. We could
+ * instead test for the macro, but I am lazy to do that for now.
  */
 
 /*
@@ -232,6 +236,9 @@
 */
 
 #ifndef HAVE_@KIND@@C@
+#ifdef @kind@@c@
+#undef @kind@@c@
+#endif
 @typ@ @kind@@c@(@typ@ x)
 {
     return (@typ@) @kind@((double)x);
@@ -253,6 +260,9 @@
    #TYPE=LONGDOUBLE*4,FLOAT*4#
 */
 #ifndef HAVE_@KIND@@C@
+#ifdef @kind@@c@
+#undef @kind@@c@
+#endif
 @typ@ @kind@@c@(@typ@ x, @typ@ y)
 {
     return (@typ@) @kind@((double)x, (double) y);
@@ -273,6 +283,9 @@
    #TYPE=LONGDOUBLE, FLOAT#
 */
 #ifndef HAVE_@KIND@@C@
+#ifdef modf@c@
+#undef modf@c@
+#endif
 @typ@ modf@c@(@typ@ x, @typ@ *iptr)
 {
     double nx, niptr, y;



More information about the Numpy-svn mailing list