diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-05-23 18:47:08 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-05-23 18:47:08 +0000 |
commit | 519e621cce49d0f6bf3f76ffbe84537ec81b532a (patch) | |
tree | 86b63054239ac6c657911bff197c159c1dfa6441 /numpy/core/src/arrayobject.c | |
parent | 5b87029e229fa3dcf0e81231899c36bd52a7616c (diff) | |
download | numpy-519e621cce49d0f6bf3f76ffbe84537ec81b532a.tar.gz |
Fix so that _internal.py gets imported when it is needed. Perhaps this will fix the problem with multiple-interpreters not working correctly.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index c774ae5a2..d86ec6171 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -6131,6 +6131,9 @@ array_dataptr_get(PyArrayObject *self) static PyObject * array_ctypes_get(PyArrayObject *self) { + PyObject *_numpy_internal; + _numpy_internal = PyImport_ImportModule("numpy.core._internal"); + if (_numpy_internal == NULL) return NULL; return PyObject_CallMethod(_numpy_internal, "_ctypes", "ON", self, PyLong_FromVoidPtr(self->data)); @@ -10844,6 +10847,7 @@ static PyObject * arraydescr_protocol_descr_get(PyArray_Descr *self) { PyObject *dobj, *res; + PyObject *_numpy_internal; if (self->names == NULL) { /* get default */ @@ -10858,6 +10862,8 @@ arraydescr_protocol_descr_get(PyArray_Descr *self) return res; } + _numpy_internal = PyImport_ImportModule("numpy.core._internal"); + if (_numpy_internal == NULL) return NULL; return PyObject_CallMethod(_numpy_internal, "_array_descr", "O", self); } @@ -11637,12 +11643,6 @@ static PyTypeObject PyArrayDescr_Type = { /** Array Flags Object **/ -typedef struct PyArrayFlagsObject { - PyObject_HEAD - PyObject *arr; - int flags; -} PyArrayFlagsObject; - /*OBJECT_API Get New ArrayFlagsObject */ |