diff options
| author | Travis Oliphant <oliphant@enthought.com> | 2006-01-25 23:58:35 +0000 |
|---|---|---|
| committer | Travis Oliphant <oliphant@enthought.com> | 2006-01-25 23:58:35 +0000 |
| commit | 656b8ba14074b62b0560748324fd66186410e396 (patch) | |
| tree | 7000ce3372fa8b818bfd91fe475f8cbd6d8c9d73 /numpy/core/src/arrayobject.c | |
| parent | 2a71223ff0ca8ff7c9f7cb69c73de19ae19c1782 (diff) | |
| download | numpy-656b8ba14074b62b0560748324fd66186410e396.tar.gz | |
Simplify hasobject checks by setting hasobject to 1 for OBJECT_Descr data-type descriptor.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
| -rw-r--r-- | numpy/core/src/arrayobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 33a86efe5..033eef26d 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -3762,10 +3762,10 @@ PyArray_NewFromDescr(PyTypeObject *subtype, PyArray_Descr *descr, int nd, /* It is bad to have unitialized OBJECT pointers */ /* which could also be sub-fields of a VOID array */ - if (descr == &OBJECT_Descr || descr->hasobject) { - if (descr->hasobject) { + if (descr->hasobject) { + if (descr != &OBJECT_Descr) { PyErr_SetString(PyExc_TypeError, - "fields with object members "\ + "fields with object members " \ "not yet supported."); goto fail; } |
