summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-04-04 15:34:49 +0000
committerPauli Virtanen <pav@iki.fi>2010-04-04 15:34:49 +0000
commit64e70811b58ade22a4a2c4be24b41dec23303942 (patch)
treecdf6d97cdd54849ab25e3d708022021ead68357a
parentaf2b0578c642cb269478dc3b048e59d0d79e0820 (diff)
downloadnumpy-64e70811b58ade22a4a2c4be24b41dec23303942.tar.gz
ENH: get rid of #warning directives, either by fixing the issue or changing them to comments
-rw-r--r--numpy/core/src/multiarray/buffer.c2
-rw-r--r--numpy/core/src/multiarray/common.c2
-rw-r--r--numpy/core/src/multiarray/ctors.c2
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src2
-rw-r--r--numpy/core/src/scalarmathmodule.c.src10
-rw-r--r--numpy/lib/src/_compiled_base.c6
-rw-r--r--numpy/numarray/_capi.c6
7 files changed, 10 insertions, 20 deletions
diff --git a/numpy/core/src/multiarray/buffer.c b/numpy/core/src/multiarray/buffer.c
index f3d94eb8a..751a8c3f7 100644
--- a/numpy/core/src/multiarray/buffer.c
+++ b/numpy/core/src/multiarray/buffer.c
@@ -248,7 +248,7 @@ _buffer_format_string(PyArray_Descr *descr, _tmp_string_t *str,
/* 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;
diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c
index 68ebc10b5..1f5f98af9 100644
--- a/numpy/core/src/multiarray/common.c
+++ b/numpy/core/src/multiarray/common.c
@@ -308,7 +308,7 @@ _array_find_type(PyObject *op, PyArray_Descr *minitype, int max)
}
#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;
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index c1ee7bd7b..c8106fb0c 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -1096,7 +1096,7 @@ discover_depth(PyObject *s, int max, int stop_at_string, int stop_at_tuple)
}
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
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index 173416b08..107633b0d 100644
--- a/numpy/core/src/multiarray/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -1962,7 +1962,7 @@ gentype_getbuffer(PyObject *self, Py_buffer *view, int flags)
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);
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index cfd3c0bc9..5ab720bb0 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -1306,8 +1306,6 @@ alter_pyscalars(PyObject *NPY_UNUSED(dummy), PyObject *args)
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 @@ restore_pyscalars(PyObject *NPY_UNUSED(dummy), PyObject *args)
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 @@ use_pythonmath(PyObject *NPY_UNUSED(dummy), PyObject *args)
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 @@ use_scalarmath(PyObject *NPY_UNUSED(dummy), PyObject *args)
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 @@ initscalarmath(void)
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)
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c
index 38a446c06..3ded93e0b 100644
--- a/numpy/lib/src/_compiled_base.c
+++ b/numpy/lib/src/_compiled_base.c
@@ -559,7 +559,7 @@ static PyObject *
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 @@ arr_add_docstring(PyObject *NPY_UNUSED(dummy), PyObject *args)
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;
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c
index a861feec9..875e383ea 100644
--- a/numpy/numarray/_capi.c
+++ b/numpy/numarray/_capi.c
@@ -90,7 +90,7 @@ static int
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 @@ static int
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 @@ static int
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;