summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 01:56:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 01:56:15 +0000
commita2359159368992c21702b2bae1a982964ba5591a (patch)
tree4f88e8b287b173568806420137aa9e1ecc4ba179 /util.c
parent45bff040c3c8f0ddf33356e400d8a0726febc4d8 (diff)
downloadruby-a2359159368992c21702b2bae1a982964ba5591a.tar.gz
ruby-a2359159368992c21702b2bae1a982964ba5591a.tar.xz
ruby-a2359159368992c21702b2bae1a982964ba5591a.zip
* dln.c (init_funcname_len, dln_find_exe_r, dln_find_file_r): use
size_t. * file.c (rb_stat_inspect, file_expand_path): ditto. * util.c (ruby_qsort): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 1417cb6fb..4a6902eaa 100644
--- a/util.c
+++ b/util.c
@@ -437,11 +437,11 @@ typedef struct { char *LL, *RR; } stack_node; /* Stack structure for L,l,R,r */
((*cmp)(b,c,d)>0 ? b : ((*cmp)(a,c,d)<0 ? a : c)))
void
-ruby_qsort(void* base, const int nel, const int size,
+ruby_qsort(void* base, const size_t nel, const size_t size,
int (*cmp)(const void*, const void*, void*), void *d)
{
register char *l, *r, *m; /* l,r:left,right group m:median point */
- register int t, eq_l, eq_r; /* eq_l: all items in left group are equal to S */
+ register size_t t, eq_l, eq_r; /* eq_l: all items in left group are equal to S */
char *L = base; /* left end of curren region */
char *R = (char*)base + size*(nel-1); /* right end of current region */
int chklim = 63; /* threshold of ordering element check */