mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make internal functions static
This commit is contained in:
parent
82332c7d8b
commit
973431c059
1 changed files with 6 additions and 3 deletions
9
gc.c
9
gc.c
|
@ -7452,7 +7452,8 @@ init_cursors(rb_objspace_t *objspace, struct heap_cursor *free, struct heap_curs
|
||||||
scan->objspace = objspace;
|
scan->objspace = objspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
int count_pinned(struct heap_page *page)
|
static int
|
||||||
|
count_pinned(struct heap_page *page)
|
||||||
{
|
{
|
||||||
RVALUE *pstart = page->start;
|
RVALUE *pstart = page->start;
|
||||||
RVALUE *pend = pstart + page->total_slots;
|
RVALUE *pend = pstart + page->total_slots;
|
||||||
|
@ -7476,14 +7477,16 @@ int count_pinned(struct heap_page *page)
|
||||||
return pinned;
|
return pinned;
|
||||||
}
|
}
|
||||||
|
|
||||||
int compare_pinned(const void *left, const void *right, void *dummy)
|
static int
|
||||||
|
compare_pinned(const void *left, const void *right, void *dummy)
|
||||||
{
|
{
|
||||||
int left_count = count_pinned(*(struct heap_page * const *)left);
|
int left_count = count_pinned(*(struct heap_page * const *)left);
|
||||||
int right_count = count_pinned(*(struct heap_page * const *)right);
|
int right_count = count_pinned(*(struct heap_page * const *)right);
|
||||||
return right_count - left_count;
|
return right_count - left_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int compare_free_slots(const void *left, const void *right, void *dummy)
|
static int
|
||||||
|
compare_free_slots(const void *left, const void *right, void *dummy)
|
||||||
{
|
{
|
||||||
struct heap_page *left_page;
|
struct heap_page *left_page;
|
||||||
struct heap_page *right_page;
|
struct heap_page *right_page;
|
||||||
|
|
Loading…
Reference in a new issue