diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-01 13:02:50 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-01 13:02:50 (GMT) |
commit | 1fcdba84be218fa2952315bd95e21339422df922 (patch) | |
tree | 93f394a43af300b607b81f1dd936ce7a91a63402 /Objects/abstract.c | |
parent | 66c981b48b7337a385a0a23b2e36cc95d9339445 (diff) | |
download | cpython-1fcdba84be218fa2952315bd95e21339422df922.zip cpython-1fcdba84be218fa2952315bd95e21339422df922.tar.gz cpython-1fcdba84be218fa2952315bd95e21339422df922.tar.bz2 |
Merged revisions 84391 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84391 | antoine.pitrou | 2010-09-01 14:58:21 +0200 (mer., 01 sept. 2010) | 5 lines
Issue #3101: Helper functions _add_one_to_C() and _add_one_to_F() become
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
........
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 98d2dd0..75de1aa 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -443,7 +443,7 @@ PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices) void -_add_one_to_index_F(int nd, Py_ssize_t *index, Py_ssize_t *shape) +_Py_add_one_to_index_F(int nd, Py_ssize_t *index, const Py_ssize_t *shape) { int k; @@ -459,7 +459,7 @@ _add_one_to_index_F(int nd, Py_ssize_t *index, Py_ssize_t *shape) } void -_add_one_to_index_C(int nd, Py_ssize_t *index, Py_ssize_t *shape) +_Py_add_one_to_index_C(int nd, Py_ssize_t *index, const Py_ssize_t *shape) { int k; @@ -483,7 +483,7 @@ int PyBuffer_ToContiguous(void *buf, Py_buffer *view, Py_ssize_t len, char fort) { int k; - void (*addone)(int, Py_ssize_t *, Py_ssize_t *); + void (*addone)(int, Py_ssize_t *, const Py_ssize_t *); Py_ssize_t *indices, elements; char *dest, *ptr; @@ -510,10 +510,10 @@ PyBuffer_ToContiguous(void *buf, Py_buffer *view, Py_ssize_t len, char fort) } if (fort == 'F') { - addone = _add_one_to_index_F; + addone = _Py_add_one_to_index_F; } else { - addone = _add_one_to_index_C; + addone = _Py_add_one_to_index_C; } dest = buf; /* XXX : This is not going to be the fastest code in the world @@ -534,7 +534,7 @@ int PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort) { int k; - void (*addone)(int, Py_ssize_t *, Py_ssize_t *); + void (*addone)(int, Py_ssize_t *, const Py_ssize_t *); Py_ssize_t *indices, elements; char *src, *ptr; @@ -561,10 +561,10 @@ PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort) } if (fort == 'F') { - addone = _add_one_to_index_F; + addone = _Py_add_one_to_index_F; } else { - addone = _add_one_to_index_C; + addone = _Py_add_one_to_index_C; } src = buf; /* XXX : This is not going to be the fastest code in the world @@ -641,7 +641,7 @@ int PyObject_CopyData(PyObject *dest, PyObject *src) elements *= view_src.shape[k]; } while (elements--) { - _add_one_to_index_C(view_src.ndim, indices, view_src.shape); + _Py_add_one_to_index_C(view_src.ndim, indices, view_src.shape); dptr = PyBuffer_GetPointer(&view_dest, indices); sptr = PyBuffer_GetPointer(&view_src, indices); memcpy(dptr, sptr, view_src.itemsize); |