mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@22943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2e498843b6
commit
0164396029
5 changed files with 22 additions and 13 deletions
4
util.c
4
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue