summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm-d-w <mw9050@gmail.com>2013-06-10 18:07:30 -0400
committerm-d-w <mw9050@gmail.com>2013-06-10 18:07:30 -0400
commitfda333b5b515adacd9d70ccdbac1e676386f4097 (patch)
treed7e303a4211a53caec2bf2fa0edd5dd667f057a8
parent3118f4fe593039cc5d523590824b4f6b2b2de5f6 (diff)
downloadnumpy-fda333b5b515adacd9d70ccdbac1e676386f4097.tar.gz
ENH: Optimize array creation by avoiding errors
-rw-r--r--numpy/core/src/multiarray/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c
index 02d74050e..995d0db25 100644
--- a/numpy/core/src/multiarray/common.c
+++ b/numpy/core/src/multiarray/common.c
@@ -49,18 +49,18 @@ PyArray_GetAttrString_SuppressException(PyObject *obj, char *name)
{
PyTypeObject *tp = Py_TYPE(obj);
PyObject *res = (PyObject *)NULL;
- if (// Is not trivial type
+ if (/* Is not trivial type */
obj != Py_None &&
!PyList_CheckExact(obj) &&
!PyTuple_CheckExact(obj)) {
- // Attribute referenced by (char *)name
+ /* Attribute referenced by (char *)name */
if (tp->tp_getattr != NULL) {
res = (*tp->tp_getattr)(obj, name);
if (res == NULL) {
PyErr_Clear();
}
}
- // Attribute referenced by (PyObject *)name
+ /* Attribute referenced by (PyObject *)name */
else if (tp->tp_getattro != NULL) {
#if defined(NPY_PY3K)
PyObject *w = PyUnicode_InternFromString(name);