[Numpy-svn] r8314 - in trunk/numpy: core/src core/src/multiarray lib/src numarray

numpy-svn@scip... numpy-svn@scip...
Sun Apr 4 10:34:49 CDT 2010


Author: ptvirtan
Date: 2010-04-04 10:34:49 -0500 (Sun, 04 Apr 2010)
New Revision: 8314

Modified:
   trunk/numpy/core/src/multiarray/buffer.c
   trunk/numpy/core/src/multiarray/common.c
   trunk/numpy/core/src/multiarray/ctors.c
   trunk/numpy/core/src/multiarray/scalartypes.c.src
   trunk/numpy/core/src/scalarmathmodule.c.src
   trunk/numpy/lib/src/_compiled_base.c
   trunk/numpy/numarray/_capi.c
Log:
ENH: get rid of #warning directives, either by fixing the issue or changing them to comments

Modified: trunk/numpy/core/src/multiarray/buffer.c
===================================================================
--- trunk/numpy/core/src/multiarray/buffer.c	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/core/src/multiarray/buffer.c	2010-04-04 15:34:49 UTC (rev 8314)
@@ -248,7 +248,7 @@
 
             /* Insert field name */
 #if defined(NPY_PY3K)
-#warning XXX -- should it use UTF-8 here?
+            /* FIXME: XXX -- should it use UTF-8 here? */
             tmp = PyUnicode_AsUTF8String(name);
 #else
             tmp = name;

Modified: trunk/numpy/core/src/multiarray/common.c
===================================================================
--- trunk/numpy/core/src/multiarray/common.c	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/core/src/multiarray/common.c	2010-04-04 15:34:49 UTC (rev 8314)
@@ -308,7 +308,7 @@
     }
 
 #if defined(NPY_PY3K)
-#warning XXX -- what is the correct thing to do here?
+    /* FIXME: XXX -- what is the correct thing to do here? */
 #else
     if (PyInstance_Check(op)) {
         goto deflt;

Modified: trunk/numpy/core/src/multiarray/ctors.c
===================================================================
--- trunk/numpy/core/src/multiarray/ctors.c	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/core/src/multiarray/ctors.c	2010-04-04 15:34:49 UTC (rev 8314)
@@ -1096,7 +1096,7 @@
     }
     if(!PySequence_Check(s) ||
 #if defined(NPY_PY3K)
-#warning XXX -- what is the correct thing to do here?
+       /* FIXME: XXX -- what is the correct thing to do here? */
 #else
        PyInstance_Check(s) ||
 #endif

Modified: trunk/numpy/core/src/multiarray/scalartypes.c.src
===================================================================
--- trunk/numpy/core/src/multiarray/scalartypes.c.src	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/core/src/multiarray/scalartypes.c.src	2010-04-04 15:34:49 UTC (rev 8314)
@@ -1962,7 +1962,7 @@
     Py_ssize_t len;
     void *buf;
 
-#warning XXX: the format is not implemented! -- this needs more work
+    /* FIXME: XXX: the format is not implemented! -- this needs more work */
 
     len = gentype_getreadbuf(self, 0, &buf);
     return PyBuffer_FillInfo(view, self, buf, len, 1, flags);

Modified: trunk/numpy/core/src/scalarmathmodule.c.src
===================================================================
--- trunk/numpy/core/src/scalarmathmodule.c.src	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/core/src/scalarmathmodule.c.src	2010-04-04 15:34:49 UTC (rev 8314)
@@ -1306,8 +1306,6 @@
             PyInt_Type.tp_richcompare = PyLongArrType_Type.tp_richcompare;
         }
         else
-#else
-#warning XXX -- is it important to do something with the integers here?
 #endif
         if (obj == (PyObject *)(&PyFloat_Type)) {
             PyFloat_Type.tp_as_number = PyDoubleArrType_Type.tp_as_number;
@@ -1350,8 +1348,6 @@
             PyInt_Type.tp_richcompare = saved_tables[2];
         }
         else
-#else
-#warning XXX -- is it important to do something with the integers here?
 #endif
         if (obj == (PyObject *)(&PyFloat_Type)) {
             PyFloat_Type.tp_as_number = saved_tables[3];
@@ -1393,8 +1389,6 @@
             PyLongArrType_Type.tp_richcompare = saved_tables[2];
         }
         else
-#else
-#warning XXX -- is it important to do something with the integers here?
 #endif
         if (obj == (PyObject *)(&PyFloat_Type)) {
             PyDoubleArrType_Type.tp_as_number = saved_tables[3];
@@ -1436,8 +1430,6 @@
             PyLongArrType_Type.tp_richcompare = saved_tables_arrtype[2];
         }
         else
-#else
-#warning XXX -- is it important to do something with the integers here?
 #endif
         if (obj == (PyObject *)(&PyFloat_Type)) {
             PyDoubleArrType_Type.tp_as_number = saved_tables_arrtype[3];
@@ -1520,8 +1512,6 @@
     saved_tables[0] = PyInt_Type.tp_as_number;
     saved_tables[1] = PyInt_Type.tp_compare;
     saved_tables[2] = PyInt_Type.tp_richcompare;
-#else
-#warning XXX -- is it important to do something with the integers here?
 #endif
     saved_tables[3] = PyFloat_Type.tp_as_number;
 #if !defined(NPY_PY3K)

Modified: trunk/numpy/lib/src/_compiled_base.c
===================================================================
--- trunk/numpy/lib/src/_compiled_base.c	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/lib/src/_compiled_base.c	2010-04-04 15:34:49 UTC (rev 8314)
@@ -559,7 +559,7 @@
 arr_add_docstring(PyObject *NPY_UNUSED(dummy), PyObject *args)
 {
     PyObject *obj;
-    PyObject *str;
+    PyObject *str, *tmp;
     char *docstr;
     static char *msg = "already has a docstring";
 
@@ -573,8 +573,8 @@
         return NULL;
     }
 
-    docstr = PyUnicode_AS_DATA(str);
-#warning XXX -- is this correct at all!?
+    tmp = PyUnicode_AsUTF8String(str);
+    docstr = PyBytes_AS_STRING(tmp);
 #else
     if (!PyArg_ParseTuple(args, "OO!", &obj, &PyString_Type, &str)) {
         return NULL;

Modified: trunk/numpy/numarray/_capi.c
===================================================================
--- trunk/numpy/numarray/_capi.c	2010-03-31 03:45:36 UTC (rev 8313)
+++ trunk/numpy/numarray/_capi.c	2010-04-04 15:34:49 UTC (rev 8314)
@@ -90,7 +90,7 @@
 getWriteBufferDataPtr(PyObject *buffobj, void **buff)
 {
 #if defined(NPY_PY3K)
-#warning XXX - needs implementation
+    /* FIXME: XXX - needs implementation */
     PyErr_SetString(PyExc_RuntimeError,
                     "XXX: getWriteBufferDataPtr is not implemented");
     return -1;
@@ -127,7 +127,7 @@
 getReadBufferDataPtr(PyObject *buffobj, void **buff)
 {
 #if defined(NPY_PY3K)
-#warning XXX - needs implementation
+    /* FIXME: XXX - needs implementation */
     PyErr_SetString(PyExc_RuntimeError,
                     "XXX: getWriteBufferDataPtr is not implemented");
     return -1;
@@ -150,7 +150,7 @@
 getBufferSize(PyObject *buffobj)
 {
 #if defined(NPY_PY3K)
-#warning XXX - needs implementation
+    /* FIXME: XXX - needs implementation */
     PyErr_SetString(PyExc_RuntimeError,
                     "XXX: getWriteBufferDataPtr is not implemented");
     return -1;



More information about the Numpy-svn mailing list