Skip to content

Commit

Permalink
Merge pull request numpy#3305 from arinkverma/master
Browse files Browse the repository at this point in the history
MAINT: Remove unneeded version check from multiarray/common.c.
  • Loading branch information
charris committed May 3, 2013
2 parents f817e76 + 7d80697 commit 0a4c8ad
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions numpy/core/src/multiarray/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ PyArray_DTypeFromObjectHelper(PyObject *obj, int maxdims,
int i, size;
PyArray_Descr *dtype = NULL;
PyObject *ip;
#if PY_VERSION_HEX >= 0x02060000
Py_buffer buffer_view;
#endif

/* Check if it's an ndarray */
if (PyArray_Check(obj)) {
Expand Down Expand Up @@ -309,7 +307,6 @@ PyArray_DTypeFromObjectHelper(PyObject *obj, int maxdims,
goto promote_types;
}

#if PY_VERSION_HEX >= 0x02060000
/* PEP 3118 buffer interface */
memset(&buffer_view, 0, sizeof(Py_buffer));
if (PyObject_GetBuffer(obj, &buffer_view, PyBUF_FORMAT|PyBUF_STRIDES) == 0 ||
Expand All @@ -334,7 +331,6 @@ PyArray_DTypeFromObjectHelper(PyObject *obj, int maxdims,
else {
PyErr_Clear();
}
#endif

/* The array interface */
ip = PyObject_GetAttrString(obj, "__array_interface__");
Expand Down

0 comments on commit 0a4c8ad

Please sign in to comment.