summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-03-09 07:55:38 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-03-09 07:55:38 +0000
commite16daf21cc5c64ffc190aa8826f7cb74d49e99be (patch)
treedb62e293c0f0d37df92ec3627c23268201cba82f /numpy
parent54608a8ddca50ecbe7c69306e9603b37b678662a (diff)
downloadnumpy-e16daf21cc5c64ffc190aa8826f7cb74d49e99be.tar.gz
More signed/unsigned fixes.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/_sortmodule.c.src4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/_sortmodule.c.src b/numpy/core/src/_sortmodule.c.src
index aa2566445..a523f83fb 100644
--- a/numpy/core/src/_sortmodule.c.src
+++ b/numpy/core/src/_sortmodule.c.src
@@ -467,7 +467,7 @@ static void
{
@type@ *pi, *pj, *pk, *pm;
- if (pr - pl > SMALL_MERGESORT*len) {
+ if ((size_t)(pr - pl) > SMALL_MERGESORT*len) {
/* merge sort */
pm = pl + (((pr - pl)/len) >> 1)*len;
@TYPE@_mergesort0(pl, pm, pw, vp, len);
@@ -546,7 +546,7 @@ static int
@type@ *stack[PYA_QS_STACK], **sptr = stack, *pm, *pi, *pj, *pk;
for(;;) {
- while ((pr - pl) > SMALL_QUICKSORT*len) {
+ while ((size_t)(pr - pl) > SMALL_QUICKSORT*len) {
/* quicksort partition */
pm = pl + (((pr - pl)/len) >> 1)*len;
if (@lessthan@(pm, pl, len)) @swap@(pm, pl, len);