From: <md...@us...> - 2007-11-26 17:23:26
|
Revision: 4448 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4448&view=rev Author: mdboom Date: 2007-11-26 09:23:18 -0800 (Mon, 26 Nov 2007) Log Message: ----------- Still trying to fix compile error on 64-bit platforms... Modified Paths: -------------- branches/transforms/src/_backend_agg.cpp branches/transforms/src/_path.cpp Modified: branches/transforms/src/_backend_agg.cpp =================================================================== --- branches/transforms/src/_backend_agg.cpp 2007-11-26 16:59:29 UTC (rev 4447) +++ branches/transforms/src/_backend_agg.cpp 2007-11-26 17:23:18 UTC (rev 4448) @@ -1203,14 +1203,14 @@ antialiaseds[0] = Py::Int(antialiased ? 1 : 0); if (showedges) { - int dims[] = { 1, 4, 0 }; + npy_intp dims[] = { 1, 4, 0 }; double data[] = { 0, 0, 0, 1 }; edgecolors_obj = PyArray_SimpleNewFromData(2, dims, PyArray_DOUBLE, (char*)data); } else { if (antialiased) { edgecolors_obj = facecolors_obj; } else { - int dims[] = { 0, 0 }; + npy_intp dims[] = { 0, 0 }; edgecolors_obj = PyArray_SimpleNew(1, dims, PyArray_DOUBLE); } } Modified: branches/transforms/src/_path.cpp =================================================================== --- branches/transforms/src/_path.cpp 2007-11-26 16:59:29 UTC (rev 4447) +++ branches/transforms/src/_path.cpp 2007-11-26 17:23:18 UTC (rev 4448) @@ -696,10 +696,12 @@ f = *(double*)(row1); } - result = (PyArrayObject*)PyArray_NewFromDescr - (&PyArray_Type, PyArray_DescrFromType(PyArray_DOUBLE), - PyArray_NDIM(vertices), PyArray_DIMS(vertices), - NULL, NULL, 0, NULL); + // I would have preferred to use PyArray_FromDims here, but on + // 64-bit platforms, PyArray_DIMS() does not return the same thing + // that PyArray_FromDims wants, requiring a copy, which I would + // like to avoid in this critical section. + result = (PyArrayObject*)PyArray_SimpleNew + (PyArray_NDIM(vertices), PyArray_DIMS(vertices), PyArray_DOUBLE); if (PyArray_NDIM(vertices) == 2) { size_t n = PyArray_DIM(vertices, 0); char* vertex_in = PyArray_BYTES(vertices); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |