diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-03-01 06:10:17 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-03-01 06:10:17 +0000 |
commit | 3f8c2dea68dd5d8b437a02f002836f09644e5c3f (patch) | |
tree | b77d3891d3073ef84d214d11f17f605633e16c3e /numpy/core/src | |
parent | 5f9949015822c662a8a5bd145f2aab08c2b3dfb2 (diff) | |
download | numpy-3f8c2dea68dd5d8b437a02f002836f09644e5c3f.tar.gz |
Swap order of fill-function arguments and make ones use fill now.
Diffstat (limited to 'numpy/core/src')
-rw-r--r-- | numpy/core/src/arrayobject.c | 2 | ||||
-rw-r--r-- | numpy/core/src/arraytypes.inc.src | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index cd83f31e1..fe53283a5 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -4112,7 +4112,7 @@ PyArray_FillWithScalar(PyArrayObject *arr, PyObject *obj) arr->descr->f->fillwithscalar; if (fillwithscalar && PyArray_ISALIGNED(arr)) { copyswap(fromptr, NULL, swap, itemsize); - fillwithscalar(toptr, size, itemsize, fromptr); + fillwithscalar(toptr, size, fromptr, arr); } else { while (size--) { diff --git a/numpy/core/src/arraytypes.inc.src b/numpy/core/src/arraytypes.inc.src index 2c570b946..4bd24904a 100644 --- a/numpy/core/src/arraytypes.inc.src +++ b/numpy/core/src/arraytypes.inc.src @@ -1715,7 +1715,7 @@ static void /* this requires buffer to be filled with objects or NULL */ static void -OBJECT_fillwithscalar(PyObject **buffer, intp length, intp ignored, PyObject **value) +OBJECT_fillwithscalar(PyObject **buffer, intp length, PyObject **value, void *ignored) { intp i; PyObject *val = *value; @@ -1730,7 +1730,7 @@ OBJECT_fillwithscalar(PyObject **buffer, intp length, intp ignored, PyObject **v #typ=Bool,byte,ubyte# */ static void -@NAME@_fillwithscalar(@typ@ *buffer, intp length, intp ignored, @typ@ *value) +@NAME@_fillwithscalar(@typ@ *buffer, intp length, @typ@ *value, void *ignored) { memset(buffer, *value, length); } @@ -1741,7 +1741,7 @@ static void #typ=short,ushort,int,uint,long,ulong,longlong,ulonglong,float,double,longdouble,cfloat,cdouble,clongdouble# */ static void -@NAME@_fillwithscalar(@typ@ *buffer, intp length, intp ignored, @typ@ *value) +@NAME@_fillwithscalar(@typ@ *buffer, intp length, @typ@ *value, void *ignored) { register intp i; @typ@ val = *value; |